Last active
August 29, 2015 14:27
-
-
Save dmgottlieb/3a3cc87770cb507f3786 to your computer and use it in GitHub Desktop.
git post-commit hook to automatically package a love-2d project for distribution as OSX app.
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
#!/bin/sh | |
branch=$(git rev-parse --abbrev-ref HEAD $1) | |
date=""`date +%d`" "`date +%B`", "`date +%Y` | |
githash="git rev-parse --short HEAD" | |
echo "Build $githash of $date" > buildinfo | |
if [ "test" == "$branch" ]; then | |
# build test distro, Mac and Windows | |
zip -9 -q -r haystack.love . | |
cp ./haystack.love ~/Projects/haystack-test/haystack-test.app/Contents/Resources/haystack.love | |
rm -Rf ~/Dropbox/haystack-test-binaries/haystack-test.app | |
cp -R ~/Projects/haystack-test/haystack-test.app ~/Dropbox/haystack-test-binaries/ | |
cat ~/Projects/haystack-test/love.exe ./haystack.love > ~/Projects/haystack-test/haystack.exe | |
rm -Rf ~/Dropbox/haystack-test-binaries/haystack.exe | |
cp -R ~/Projects/haystack-test/haystack.exe ~/Dropbox/haystack-test-binaries/ | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment