Skip to content

Instantly share code, notes, and snippets.

@sirwolfgang
Last active March 25, 2016 16:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sirwolfgang/5be5ad260c1d86b6c6a7 to your computer and use it in GitHub Desktop.
Save sirwolfgang/5be5ad260c1d86b6c6a7 to your computer and use it in GitHub Desktop.
[ -f /usr/src/app/VERSION ] && export APP_VERSION="$(cat /usr/src/app/VERSION)"
echo "$(echo $GIT_BRANCH | awk '{gsub("origin/","", $0); print $0}')-$(echo $GIT_COMMIT | awk '{print substr($0,0,7)}')" > VERSION
echo "$(git rev-parse --abbrev-ref HEAD)-$(git describe --always HEAD)" > VERSION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment