Update the Chinese conversion table for Chinese WikiProjects
[lhc/web/wiklou.git] / maintenance / resources / update-oojs-ui.sh
index a20b83b..88d9f87 100755 (executable)
@@ -15,6 +15,7 @@ NPM_DIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'update-oojs-ui') # e.g. /tmp/up
 
 # Prepare working tree
 cd "$REPO_DIR" &&
+git reset composer.json && git checkout composer.json &&
 git reset $TARGET_DIR && git checkout $TARGET_DIR && git fetch origin &&
 git checkout -B upstream-oojs-ui origin/master || exit 1
 
@@ -34,9 +35,15 @@ then
        exit 1
 fi
 
-# Copy files
-# - Exclude the minimised distribution files and RTL sheets for non-CSSJanus environments
-rsync --force --recursive --delete --exclude 'oojs-ui*.min.*' --exclude 'oojs-ui*.rtl.css' ./node_modules/oojs-ui/dist/ "$REPO_DIR/$TARGET_DIR" || exit 1
+# Copy files, excluding:
+# * the Apex theme files,
+# * the minimised distribution files, and
+# * the RTL sheets for non-CSSJanus environments
+rsync --force --recursive --delete \
+       --exclude '*apex*' \
+       --exclude 'oojs-ui*.min.*' \
+       --exclude 'oojs-ui*.rtl.css' \
+       ./node_modules/oojs-ui/dist/ "$REPO_DIR/$TARGET_DIR" || exit 1
 
 # Clean up temporary area
 rm -rf "$NPM_DIR"
@@ -52,5 +59,8 @@ Release notes:
 END
 )
 
+# Update composer.json as well
+composer require oojs/oojs-ui $OOJSUI_VERSION --no-update
+
 # Stage deletion, modification and creation of files. Then commit.
-git add --update $TARGET_DIR && git add $TARGET_DIR && git commit -m "$COMMITMSG" || exit 1
+git add --update $TARGET_DIR && git add $TARGET_DIR && git add composer.json && git commit -m "$COMMITMSG" || exit 1