-
-
Save romanr/6129279 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# | |
# An example hook script that is called after a successful | |
# commit is made. | |
# | |
# To enable this hook, rename this file to "post-commit". | |
path="path to application" | |
User="userforssh" | |
server="servername" | |
dist="/Users/justin/Apps/Play20/play dist" | |
filename="application.zip" | |
script(){ | |
echo "Deploying to remote server" | |
echo "From directory $(pwd)" | |
cd $path | |
echo $pwd | |
$dist | |
echo $path/dist/$filename | |
cd "dist" | |
scp $filename $server: | |
ssh $User@$server ./deploy.sh | |
exit | |
} | |
case "$1" in | |
*) | |
script | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment