Commit 0cc30994 authored by Baptiste CHOCOT's avatar Baptiste CHOCOT
Browse files

Add auto-merge&tag script (dev -> master)

parent e8ad6278
#!/bin/sh
###################################################################
# #
# Merge `development` branch into `master` branch and push with a #
# generic but explicit tag. #
# #
# The tag is update depending on the previous one: #
# - 1 -> 2 #
# - 1.0 -> 1.1 #
# - 1.0.1 -> 1.0.2 #
# #
# The description of the tag has the following format: #
# Release <tag> - MM.DD.YY #
# #
###################################################################
tag=`git describe --tags --abbrev=0`
subversion=$((`echo $tag | rev | cut -d. -f1` + 1))
tag=`echo $tag | sed "s/.\$/$subversion/"`
date=`date +"%m.%d.%y"`
git pull origin master
git checkout master
git merge development
git tag -a $tag -m "Release $tag - $date"
git push --tags origin
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment