Skip to content

Commit 7423e75

Browse files
committed
fix release process
1 parent 5f05dd5 commit 7423e75

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

docs/contribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ git push origin :<old-name> && git push origin <new-name>
8383
gh pr create --fill
8484
```
8585

86-
After the merge, don't forget to delete to branch.
86+
> Note: after the merge, don't forget to delete to branch.
8787
8888
#### New release
8989

9090
```bash
91-
git checkout main && git pull
91+
git checkout main && git pull && git co -
9292
git describe --tags `git rev-list --tags --max-count=1` # to verify what is the current tag
9393
export NEW_GIT_VERSION=v #...X.X.X
9494
./scripts/publish-release.sh

scripts/publish-release.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/bash
22

3+
# Check state.
34
if [ -z "${NEW_GIT_VERSION}" ]; then
45
echo "No \$NEW_GIT_VERSION env var found. Exiting."
56
exit 1
67
fi
78

9+
# Initilize
810
platform='unknown'
911
unamestr=`uname`
1012
if [[ "$unamestr" == 'Linux' ]]; then
@@ -14,9 +16,9 @@ elif [[ "$unamestr" == 'FreeBSD' ]]; then
1416
elif [[ "$unamestr" == 'Darwin' ]]; then
1517
platform='osx'
1618
fi
17-
1819
git_base_dir=`git rev-parse --show-toplevel`
1920

21+
# Update version everywhere (add and commit changes)
2022
if [[ $platform == 'linux' ]]; then
2123
sed -i -E "s/v[0-9]+\.[0-9]+\.[0-9]/$NEW_GIT_VERSION/" `git rev-parse --show-toplevel`/src/Constants.php
2224
else
@@ -27,7 +29,11 @@ git add `git rev-parse --show-toplevel`/src/Constants.php
2729

2830
git add $git_base_dir/src/Constants.php
2931
git commit -m "bump version to $NEW_GIT_VERSION"
32+
git push
3033
echo "Note: new commit \"bump version to $NEW_GIT_VERSION\""
34+
35+
# Tag and release
36+
git checkout main
3137
git tag $NEW_GIT_VERSION
3238
git push origin $NEW_GIT_VERSION
3339
gh release create --draft $NEW_GIT_VERSION --title $NEW_GIT_VERSION

0 commit comments

Comments
 (0)