#!/bin/bash -eu
-# This script generates a commit that updates our copy of OOjs UI
+# This script generates a commit that updates our copy of OOUI
if [ -n "${2:-}" ]
then
git reset -- $TARGET_DIR
git checkout -- $TARGET_DIR
git fetch origin
-git checkout -B upstream-oojs-ui origin/master
+git checkout -B upstream-ooui origin/master
# Fetch upstream version
cd $NPM_DIR
npm install oojs-ui
fi
-OOJSUI_VERSION=$(node -e 'console.log(require("./node_modules/oojs-ui/package.json").version);')
-if [ "$OOJSUI_VERSION" == "" ]
+OOUI_VERSION=$(node -e 'console.log(require("./node_modules/oojs-ui/package.json").version);')
+if [ "$OOUI_VERSION" == "" ]
then
- echo 'Could not find OOjs UI version'
+ echo 'Could not find OOUI version'
exit 1
fi
cd $REPO_DIR
COMMITMSG=$(cat <<END
-Update OOjs UI to v$OOJSUI_VERSION
+Update OOUI to v$OOUI_VERSION
Release notes:
- https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v$OOJSUI_VERSION
+ https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v$OOUI_VERSION
END
)
# Update composer.json as well
-composer require oojs/oojs-ui $OOJSUI_VERSION --no-update
+composer require oojs/oojs-ui $OOUI_VERSION --no-update
# Stage deletion, modification and creation of files. Then commit.
git add --update $TARGET_DIR