Created
May 14, 2019 15:58
-
-
Save nishanthvijayan/68649d2d8e788aa8a4d77e3e30a6d5f7 to your computer and use it in GitHub Desktop.
PortCommit Hook that builds project directory into zip with last commit ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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