File tree 1 file changed +3
-23
lines changed
1 file changed +3
-23
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- # Make sure the release tag is provided.
6
5
if (( "$# " != 1 ))
7
6
then
8
- echo " Tag has to be provided. "
7
+ echo " Tag has to be provided"
9
8
10
9
exit 1
11
10
fi
12
11
13
- # Make sure the working directory is clear.
14
- if [ -z " $( git status --porcelain) " ]; then
15
- echo " Working directory clean"
16
- else
17
- echo " Your working directory is dirty. Did you forget to commit your changes?"
18
-
19
- exit 1
20
- fi
21
-
22
- RELEASE_BRANCH=" 6.x"
23
- CURRENT_BRANCH=$( git branch --show-current)
12
+ CURRENT_BRANCH=" 6.x"
24
13
VERSION=$1
25
14
26
- # Make sure current branch and release branch match.
27
- if (( $RELEASE_BRANCH != $CURRENT_BRANCH ))
28
- then
29
- echo " Release branch ($RELEASE_BRANCH ) does not matches the current active branch ($CURRENT_BRANCH )."
30
-
31
- exit 1
32
- fi
33
-
34
15
# Always prepend with "v"
35
16
if [[ $VERSION != v* ]]
36
17
then
37
18
VERSION=" v$VERSION "
38
19
fi
39
20
40
21
# Tag Framework
41
- git pull
42
22
git tag $VERSION
43
23
git push origin --tags
44
24
59
39
cd $TMP_DIR ;
60
40
61
41
git clone $REMOTE_URL .
62
- git checkout " $RELEASE_BRANCH " ;
42
+ git checkout " $CURRENT_BRANCH " ;
63
43
64
44
git tag $VERSION
65
45
git push origin --tags
You can’t perform that action at this time.
0 commit comments