File tree 1 file changed +14
-8
lines changed
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 32
32
git checkout $CURRENT_BRANCH ;
33
33
# gsort comes with coreutils packages. brew install coreutils
34
34
LAST_RELEASE=$( git tag -l [0-9].* | gsort -V | tail -n1 )
35
-
36
- echo " Last release $LAST_RELEASE " ;
37
-
38
- CHANGES_SINCE_LAST_RELEASE=$( git log " $LAST_RELEASE " ...master)
39
- CHANGES_SINCE_LAST_RELEASE=" $CHANGES_SINCE_LAST_RELEASE " | xargs echo -n
40
- if [[ ! -z " $CHANGES_SINCE_LAST_RELEASE " || -z $LAST_RELEASE ]]; then
41
- echo " There are changes since last release. Releasing $1 " ;
35
+ if [[ -z " $LAST_RELEASE " ]]; then
36
+ echo " There has not been any releases. Releasing $1 " ;
42
37
43
38
git tag $1 -s -m " Release $1 "
44
39
git push origin --tags
45
40
else
46
- echo " No change since last release." ;
41
+ echo " Last release $LAST_RELEASE " ;
42
+
43
+ CHANGES_SINCE_LAST_RELEASE=$( git log " $LAST_RELEASE " ...master)
44
+ CHANGES_SINCE_LAST_RELEASE=" $CHANGES_SINCE_LAST_RELEASE " | xargs echo -n
45
+ if [[ ! -z " $CHANGES_SINCE_LAST_RELEASE " ]]; then
46
+ echo " There are changes since last release. Releasing $1 " ;
47
+
48
+ git tag $1 -s -m " Release $1 "
49
+ git push origin --tags
50
+ else
51
+ echo " No change since last release." ;
52
+ fi
47
53
fi
48
54
)
49
55
done
You can’t perform that action at this time.
0 commit comments