Skip to content

Instantly share code, notes, and snippets.

@eat-sleep-code
Last active August 15, 2020 04:33
Show Gist options
  • Save eat-sleep-code/8ab7e73636aa8ec65744379c5fa0eb75 to your computer and use it in GitHub Desktop.
Save eat-sleep-code/8ab7e73636aa8ec65744379c5fa0eb75 to your computer and use it in GitHub Desktop.
Shell script for performing build, commit, and deploy (alter as necessary)
#! /bin/sh -e
commitMessage="$1"
release="$2"
version=$(date +"v%Y.%m.%d.%H%M%S")
grunt
git add . -A
git commit -m "$version: $commitMessage"
git push -u origin development
if [ "$release" == "release" ]; then
firebase deploy
git push origin development:master
git tag -a "$version" -m "$version: $commitMessage"
git push -u origin "$version"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment