Skip to content

Instantly share code, notes, and snippets.

@romanr
Forked from justinholmes/githook.sh
Created August 1, 2013 07:49
Show Gist options
  • Save romanr/6129279 to your computer and use it in GitHub Desktop.
Save romanr/6129279 to your computer and use it in GitHub Desktop.
#!/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