Skip to content

Instantly share code, notes, and snippets.

@nishanthvijayan
Created May 14, 2019 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishanthvijayan/68649d2d8e788aa8a4d77e3e30a6d5f7 to your computer and use it in GitHub Desktop.
Save nishanthvijayan/68649d2d8e788aa8a4d77e3e30a6d5f7 to your computer and use it in GitHub Desktop.
PortCommit Hook that builds project directory into zip with last commit ID
# Clean dist.
# We don't want previous release files getting included in this release.
rm dist/*
# Get git last commit ID
lastcommitID=$(git log --format="%H" -n 1)
echo "Create zip file release: dist/${lastcommitID}.zip"
# Zip quietly
zip -q -r dist/${lastcommitID}.zip .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment