Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ActEV
diva_evaluation_cli
Commits
0cc30994
Commit
0cc30994
authored
Jan 31, 2020
by
Baptiste CHOCOT
Browse files
Add auto-merge&tag script (dev -> master)
parent
e8ad6278
Changes
1
Hide whitespace changes
Inline
Side-by-side
merge_dev_into_master.sh
0 → 100755
View file @
0cc30994
#!/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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment