File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,12 @@ git push origin :<old-name> && git push origin <new-name>
83
83
gh pr create --fill
84
84
```
85
85
86
- After the merge, don't forget to delete to branch.
86
+ > Note: after the merge, don't forget to delete to branch.
87
87
88
88
#### New release
89
89
90
90
``` bash
91
- git checkout main && git pull
91
+ git checkout main && git pull && git co -
92
92
git describe --tags ` git rev-list --tags --max-count=1` # to verify what is the current tag
93
93
export NEW_GIT_VERSION=v # ...X.X.X
94
94
./scripts/publish-release.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ # Check state.
3
4
if [ -z " ${NEW_GIT_VERSION} " ]; then
4
5
echo " No \$ NEW_GIT_VERSION env var found. Exiting."
5
6
exit 1
6
7
fi
7
8
9
+ # Initilize
8
10
platform=' unknown'
9
11
unamestr=` uname`
10
12
if [[ " $unamestr " == ' Linux' ]]; then
@@ -14,9 +16,9 @@ elif [[ "$unamestr" == 'FreeBSD' ]]; then
14
16
elif [[ " $unamestr " == ' Darwin' ]]; then
15
17
platform=' osx'
16
18
fi
17
-
18
19
git_base_dir=` git rev-parse --show-toplevel`
19
20
21
+ # Update version everywhere (add and commit changes)
20
22
if [[ $platform == ' linux' ]]; then
21
23
sed -i -E " s/v[0-9]+\.[0-9]+\.[0-9]/$NEW_GIT_VERSION /" ` git rev-parse --show-toplevel` /src/Constants.php
22
24
else
@@ -27,7 +29,11 @@ git add `git rev-parse --show-toplevel`/src/Constants.php
27
29
28
30
git add $git_base_dir /src/Constants.php
29
31
git commit -m " bump version to $NEW_GIT_VERSION "
32
+ git push
30
33
echo " Note: new commit \" bump version to $NEW_GIT_VERSION \" "
34
+
35
+ # Tag and release
36
+ git checkout main
31
37
git tag $NEW_GIT_VERSION
32
38
git push origin $NEW_GIT_VERSION
33
39
gh release create --draft $NEW_GIT_VERSION --title $NEW_GIT_VERSION
You can’t perform that action at this time.
0 commit comments