Created
November 19, 2017 21:00
-
-
Save evlymn/6a2ec91072be0452fc86aba3a5abea4e to your computer and use it in GitHub Desktop.
Deploy to Umbler Git
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 | |
echo "Deploy umbler master" | |
COMMIT_MSG="$1" | |
DEPLOY_FOLDER=~/projects/deploy/seusite-com | |
BUILD_FOLDER=dist | |
GIT_URL=ssh://[email protected]:9922/~/git/seusite-com.git | |
if [[ ! -d $DEPLOY_FOLDER ]]; then | |
git clone $GIT_URL $DEPLOY_FOLDER | |
fi | |
ng build --prod | |
cp -r $BUILD_FOLDER/* $DEPLOY_FOLDER | |
cd $DEPLOY_FOLDER | |
git diff --quiet; NOCHANGES=$? | |
if [ $NOCHANGES -eq 0 ]; then | |
echo "no changes" | |
else | |
echo "changes" | |
git add . | |
git commit -m"$COMMIT_MSG" | |
git push origin master | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment