Skip to content

Instantly share code, notes, and snippets.

@piyushchauhan2011
Forked from ericclemmons/bump_version
Created November 14, 2021 11:17
Show Gist options
  • Select an option

  • Save piyushchauhan2011/4b411363bf7a495796e5315e7e25f7b6 to your computer and use it in GitHub Desktop.

Select an option

Save piyushchauhan2011/4b411363bf7a495796e5315e7e25f7b6 to your computer and use it in GitHub Desktop.

Revisions

  1. @ericclemmons ericclemmons created this gist Nov 1, 2010.
    23 changes: 23 additions & 0 deletions bump_version
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/usr/bin/env bash

    echo "Checking out master branch"
    git checkout master
    git pull origin master

    git log master..develop
    read -p "Review your changes..."

    echo "Merging develop branch"
    git merge develop

    TAGSTAMP=`date +%Y-%m-%d.%H%M%S`
    echo "Tagging as ${TAGSTAMP}"
    git tag -a $TAGSTAMP

    echo "Pushing commits and tags"
    git push
    git push --tags

    echo "Checking out develop branch"
    git checkout develop
    git push