Change-Id: I579eb17c72a24ed7e23dc553fa55ce1b4e1f612c
# ./bin/update-oojs-ui.sh path/to/repo/for/oojs-ui
function oojsuihash() {
# ./bin/update-oojs-ui.sh path/to/repo/for/oojs-ui
function oojsuihash() {
- grep "OOjs UI v" resources/oojs-ui/oojs-ui.js \
+ grep "OOjs UI v" resources/lib/oojs-ui/oojs-ui.js \
| head -n 1 \
| grep -Eo '\([a-z0-9]+\)' \
| sed 's/^(//' \
| head -n 1 \
| grep -Eo '\([a-z0-9]+\)' \
| sed 's/^(//' \
- grep "OOjs UI v" resources/oojs-ui/oojs-ui.js \
+ grep "OOjs UI v" resources/lib/oojs-ui/oojs-ui.js \
| head -n 1 \
| grep -Eo '\bv[0-9a-z.-]+\b'
}
function oojsuiversion() {
| head -n 1 \
| grep -Eo '\bv[0-9a-z.-]+\b'
}
function oojsuiversion() {
- grep "OOjs UI v" resources/oojs-ui/oojs-ui.js \
+ grep "OOjs UI v" resources/lib/oojs-ui/oojs-ui.js \
| head -n 1 \
| grep -Eo '\bv[0-9a-z.-]+\b.*$'
}
| head -n 1 \
| grep -Eo '\bv[0-9a-z.-]+\b.*$'
}
-# cd to the VisualEditor directory
-cd $(cd $(dirname $0)/../..; pwd)
+# cd to the MW root directory
+cd $(cd $(dirname $0)/../../..; pwd)
fi
# Undo any changes in the oojs-ui directory
fi
# Undo any changes in the oojs-ui directory
-git reset resources/oojs-ui/
-git checkout resources/oojs-ui/
+git reset -- resources/lib/oojs-ui/
+git checkout -- resources/lib/oojs-ui/
git fetch origin
# Create a branch of MW if needed, and reset it to master
git fetch origin
# Create a branch of MW if needed, and reset it to master
# cd back to the VisualEditor directory
cd -
# cd back to the VisualEditor directory
cd -
-# Copy files from dist/ to resources/oojs-ui
-cp -a $1/dist/{oojs-ui.js,oojs-ui.svg.css,oojs-ui-apex.css,oojs-ui-agora.css,images,i18n} resources/oojs-ui/
+# Copy files from dist/ to resources/lib/oojs-ui
+cp -a $1/dist/{oojs-ui.js,oojs-ui.svg.css,oojs-ui-apex.css,oojs-ui-agora.css,images,i18n} resources/lib/oojs-ui/
# Figure out what the new version is
NEWVERSION=$(oojsuiversion)
# Generate commit summary
# Figure out what the new version is
NEWVERSION=$(oojsuiversion)
# Generate commit summary
-git commit resources/oojs-ui/ -m "$COMMITMSG"
+git commit resources/lib/oojs-ui/ -m "$COMMITMSG"