Skip to content

Instantly share code, notes, and snippets.

@juji
Created December 14, 2017 12:40
Show Gist options
  • Save juji/2e4e7911cbc250f89f7f1775a2f24a8c to your computer and use it in GitHub Desktop.
Save juji/2e4e7911cbc250f89f7f1775a2f24a8c to your computer and use it in GitHub Desktop.
git deploy script
#!/bin/bash
if [[ "$1" == "" ]]; then
echo 'usage: deploy <origin> <branch>'
exit
fi
if [[ "$2" == "" ]]; then
echo 'usage: deploy <origin> <branch>'
exit
fi
read -p "commit message: " mssg
echo ''
echo '========================================'
echo "origin: $1"
echo "branch: $2"
echo "message: $mssg"
yarn lint
git add -A
git commit -am "$mssg"
git push "$1" "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment