maintenance: Have update-oojs-ui.sh update composer.json too
authorJames D. Forrester <jforrester@wikimedia.org>
Wed, 17 Dec 2014 01:32:54 +0000 (17:32 -0800)
committerJforrester <jforrester@wikimedia.org>
Sat, 10 Jan 2015 01:26:24 +0000 (01:26 +0000)
Change-Id: Ifa37c9dcd136051c5ab8967f7ba1e490a5aa7861

maintenance/resources/update-oojs-ui.sh

index 93aacde..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
 
@@ -58,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