File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 99 options :
1010 - PATCH
1111 - MINOR
12- - MAJOR
1312
1413permissions :
1514 contents : write
3130 MINOR=$(cat $VERSION_FILE | grep "const MINOR" | sed -e 's/^.*\ \(=\ \)*\(\"\)*\([0-9]*\)\(\"\)*.*/\3/g');
3231 PATCH=$(cat $VERSION_FILE | grep "const PATCH" | sed -e 's/^.*\ \(=\ \)*\(\"\)*\([0-9]*\)\(\"\)*.*/\3/g');
3332 LAST_TAG="v$MAJOR.$MINOR.$PATCH";
34- if [ "$VERSION_CHANGE" = "MAJOR" ]
35- then
36- MAJOR=$((MAJOR+1));
37- MINOR=0;
38- PATCH=0;
39- fi;
4033 if [ "$VERSION_CHANGE" = "MINOR" ]
4134 then
4235 MINOR=$((MINOR+1));
4639 then
4740 PATCH=$((PATCH+1));
4841 fi;
49- sed -e 's/const MAJOR = "\([0-9]*\)"/const MAJOR = "'$MAJOR'"/g' -i $VERSION_FILE;
50- sed -e 's/const MINOR = "\([0-9]*\)"/const MINOR = "'$MINOR'"/g' -i $VERSION_FILE;
51- sed -e 's/const PATCH = "\([0-9]*\)"/const PATCH = "'$PATCH'"/g' -i $VERSION_FILE;
42+ echo "<?php
43+ const MAJOR = "$MAJOR";
44+ const MINOR = "$MINOR";
45+ const PATCH = "$PATCH";
46+ " >> $VERSION_FILE.tmp
47+ mv $VERSION_FILE.tmp $VERSION_FILE;
5248 git add $VERSION_FILE;
5349 echo "## $MAJOR.$MINOR.$PATCH" >> $CHANGELOG_FILE.tmp
5450 cat $CHANGELOG_FILE >> $CHANGELOG_FILE.tmp
You can’t perform that action at this time.
0 commit comments