You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
497 B
24 lines
497 B
#!/bin/bash
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
. $SCRIPT_DIR/settings.sh || {
|
|
echo "no settings" && exit 1
|
|
}
|
|
|
|
VER=$1
|
|
|
|
if [[ -z "$VER" ]]; then
|
|
echo "Version not defined in first argument."
|
|
exit
|
|
fi
|
|
|
|
cd "${SCRIPT_DIR}/.."
|
|
|
|
git fetch && git checkout $VER
|
|
|
|
if [[ `echo $?` -ne 0 ]]; then
|
|
echo "Unable to checkout choose tag or branch or error in submodule update command."
|
|
exit 1
|
|
fi
|
|
|
|
cd "${SCRIPT_DIR}/../wp-content/themes/$THEME/" && yarn && yarn build
|