Last active
December 8, 2018 18:33
-
-
Save mauricionr/e7c8ab9ff13a72d253b9d26fd90657d1 to your computer and use it in GitHub Desktop.
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
function gitup(){ | |
local branch=$(git rev-parse --abbrev-ref HEAD) | |
if [ $branch == "master" ]; then | |
echo "On master do nothing" | |
else | |
echo "Current branch $branch" | |
git add . | |
git commit -m "$1" | |
git push origin $branch | |
fi | |
} | |
function deploy(){ | |
echo "Deploying to k8s $1" | |
local branch=$(git rev-parse --abbrev-ref HEAD) | |
git push origin "$branch:dev-$1" | |
} | |
function update(){ | |
git fetch origin | |
git stash | |
git checkout master | |
git pull origin master --rebase | |
} | |
function status(){ | |
git status | |
} | |
function mdev(){ | |
export MIX_ENV=dev | |
export MIX_TARGET=host | |
} | |
function mprod(){ | |
export MIX_ENV=prod | |
export MIX_TARGET=rpi3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment