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

  1. #!/bin/bash
  2. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. . $SCRIPT_DIR/settings.sh || {
  4. echo "no settings" && exit 1
  5. }
  6. VER=$1
  7. if [[ -z "$VER" ]]; then
  8. echo "Version not defined in first argument."
  9. exit
  10. fi
  11. cd "${SCRIPT_DIR}/.."
  12. git fetch && git checkout $VER
  13. if [[ `echo $?` -ne 0 ]]; then
  14. echo "Unable to checkout choose tag or branch or error in submodule update command."
  15. exit 1
  16. fi
  17. cd "${SCRIPT_DIR}/../wp-content/themes/$THEME/" && yarn && yarn build