Skip to content

Instantly share code, notes, and snippets.

@fannheyward
Last active April 10, 2019 05:17
Show Gist options
  • Save fannheyward/4defad9227d1ee3fea48496c15ff3fbc to your computer and use it in GitHub Desktop.
Save fannheyward/4defad9227d1ee3fea48496c15ff3fbc to your computer and use it in GitHub Desktop.
#!/bin/sh
set -uex
DIR=XXX
cd ${DIR}
REV1=$(git rev-parse --verify HEAD)
git pull
REV2=$(git rev-parse --verify HEAD)
test ${REV1} = ${REV2} && echo "already update" && exit
yarn build
test $? -ne 0 && echo "yarn build error" && exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment