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 9
9
options :
10
10
- PATCH
11
11
- MINOR
12
- - MAJOR
13
12
14
13
permissions :
15
14
contents : write
31
30
MINOR=$(cat $VERSION_FILE | grep "const MINOR" | sed -e 's/^.*\ \(=\ \)*\(\"\)*\([0-9]*\)\(\"\)*.*/\3/g');
32
31
PATCH=$(cat $VERSION_FILE | grep "const PATCH" | sed -e 's/^.*\ \(=\ \)*\(\"\)*\([0-9]*\)\(\"\)*.*/\3/g');
33
32
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;
40
33
if [ "$VERSION_CHANGE" = "MINOR" ]
41
34
then
42
35
MINOR=$((MINOR+1));
46
39
then
47
40
PATCH=$((PATCH+1));
48
41
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;
52
48
git add $VERSION_FILE;
53
49
echo "## $MAJOR.$MINOR.$PATCH" >> $CHANGELOG_FILE.tmp
54
50
cat $CHANGELOG_FILE >> $CHANGELOG_FILE.tmp
You can’t perform that action at this time.
0 commit comments