Skip to content

Instantly share code, notes, and snippets.

@mauricionr
Last active December 8, 2018 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauricionr/e7c8ab9ff13a72d253b9d26fd90657d1 to your computer and use it in GitHub Desktop.
Save mauricionr/e7c8ab9ff13a72d253b9d26fd90657d1 to your computer and use it in GitHub Desktop.
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