Skip to content

Commit 45074c7

Browse files
committed
fix release process
1 parent 8749f9e commit 45074c7

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

docs/contribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ git push origin :<old-name> && git push origin <new-name>
9696
gh pr create --fill
9797
```
9898

99-
After the merge, don't forget to delete to branch.
99+
> Note: after the merge, don't forget to delete to branch.
100100
101101
#### New release
102102

103103
```bash
104-
git checkout main && git pull
104+
git checkout main && git pull && git co -
105105
git describe --tags `git rev-list --tags --max-count=1` # to verify what is the current tag
106106
export NEW_GIT_VERSION_WITHOUT_V_PREFIX= #...X.X.X
107107
./scripts/publish-release.sh

scripts/publish-release.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ elif [[ "$unamestr" == 'Darwin' ]]; then
1818
fi
1919
git_base_dir=`git rev-parse --show-toplevel`
2020

21-
# Update version everywhere (add and commit changes)
21+
# Update version everywhere (add and commit changes), tag and release
22+
git checkout main
2223
if [[ $platform == 'linux' ]]; then
23-
sed -i -E "s/Version [0-9]+\.[0-9]+\.[0-9]/Version $NEW_GIT_VERSION_WITHOUT_V_PREFIX/" `git rev-parse --show-toplevel`/crowdsec.php
24-
sed -i -E "s/Stable tag: [0-9]+\.[0-9]+\.[0-9]/Stable tag: $NEW_GIT_VERSION_WITHOUT_V_PREFIX/" `git rev-parse --show-toplevel`/crowdsec.php
25-
sed -i -E "s/v[0-9]+\.[0-9]+\.[0-9]/v$NEW_GIT_VERSION_WITHOUT_V_PREFIX/" `git rev-parse --show-toplevel`/inc/constants.php
24+
sed -i -E "s/Version [0-9]+\.[0-9]+\.[0-9]/Version $NEW_GIT_VERSION_WITHOUT_V_PREFIX/" $git_base_dir/crowdsec.php
25+
sed -i -E "s/Stable tag: [0-9]+\.[0-9]+\.[0-9]/Stable tag: $NEW_GIT_VERSION_WITHOUT_V_PREFIX/" $git_base_dir/crowdsec.php
26+
sed -i -E "s/v[0-9]+\.[0-9]+\.[0-9]/v$NEW_GIT_VERSION_WITHOUT_V_PREFIX/" $git_base_dir/inc/constants.php
2627
else
27-
sed -i "" -E "s/Version [0-9]+\.[0-9]+\.[0-9]/Version $NEW_GIT_VERSION_WITHOUT_V_PREFIX/" `git rev-parse --show-toplevel`/crowdsec.php
28-
sed -i "" -E "s/Stable tag: [0-9]+\.[0-9]+\.[0-9]/Stable tag: $NEW_GIT_VERSION_WITHOUT_V_PREFIX/" `git rev-parse --show-toplevel`/crowdsec.php
29-
sed -i "" -E "s/v[0-9]+\.[0-9]+\.[0-9]/v$NEW_GIT_VERSION_WITHOUT_V_PREFIX/" `git rev-parse --show-toplevel`/inc/constants.php
28+
sed -i "" -E "s/Version [0-9]+\.[0-9]+\.[0-9]/Version $NEW_GIT_VERSION_WITHOUT_V_PREFIX/" $git_base_dir/crowdsec.php
29+
sed -i "" -E "s/Stable tag: [0-9]+\.[0-9]+\.[0-9]/Stable tag: $NEW_GIT_VERSION_WITHOUT_V_PREFIX/" $git_base_dir/crowdsec.php
30+
sed -i "" -E "s/v[0-9]+\.[0-9]+\.[0-9]/v$NEW_GIT_VERSION_WITHOUT_V_PREFIX/" $git_base_dir/inc/constants.php
3031
fi
31-
git add `git rev-parse --show-toplevel`/inc/constants.php
32-
git add `git rev-parse --show-toplevel`/crowdsec.php
33-
git commit -m "bump version to v$NEW_GIT_VERSION_WITHOUT_V_PREFIX"
34-
echo "Note: new commit \"bump version to v$NEW_GIT_VERSION_WITHOUT_V_PREFIX\""
32+
git add $git_base_dir/inc/constants.php
33+
git add $git_base_dir/crowdsec.php
3534

36-
# Tag and release
3735
git tag v$NEW_GIT_VERSION_WITHOUT_V_PREFIX
36+
git commit -m "bump version to v$NEW_GIT_VERSION_WITHOUT_V_PREFIX"
37+
git push
3838
git push origin v$NEW_GIT_VERSION_WITHOUT_V_PREFIX
3939
gh release create --draft v$NEW_GIT_VERSION_WITHOUT_V_PREFIX --title v$NEW_GIT_VERSION_WITHOUT_V_PREFIX

0 commit comments

Comments
 (0)