Created
December 14, 2017 12:40
-
-
Save juji/2e4e7911cbc250f89f7f1775a2f24a8c to your computer and use it in GitHub Desktop.
git deploy script
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/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