File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
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>
8383gh 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 -
9292git describe --tags ` git rev-list --tags --max-count=1` # to verify what is the current tag
9393export NEW_GIT_VERSION=v # ...X.X.X
9494./scripts/publish-release.sh
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Check state.
34if [ -z " ${NEW_GIT_VERSION} " ]; then
45 echo " No \$ NEW_GIT_VERSION env var found. Exiting."
56 exit 1
67fi
78
9+ # Initilize
810platform=' unknown'
911unamestr=` uname`
1012if [[ " $unamestr " == ' Linux' ]]; then
@@ -14,9 +16,9 @@ elif [[ "$unamestr" == 'FreeBSD' ]]; then
1416elif [[ " $unamestr " == ' Darwin' ]]; then
1517 platform=' osx'
1618fi
17-
1819git_base_dir=` git rev-parse --show-toplevel`
1920
21+ # Update version everywhere (add and commit changes)
2022if [[ $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
2224else
@@ -27,7 +29,11 @@ git add `git rev-parse --show-toplevel`/src/Constants.php
2729
2830git add $git_base_dir /src/Constants.php
2931git commit -m " bump version to $NEW_GIT_VERSION "
32+ git push
3033echo " Note: new commit \" bump version to $NEW_GIT_VERSION \" "
34+
35+ # Tag and release
36+ git checkout main
3137git tag $NEW_GIT_VERSION
3238git push origin $NEW_GIT_VERSION
3339gh release create --draft $NEW_GIT_VERSION --title $NEW_GIT_VERSION
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class Constants
1818 public const CAPI_URL = 'https://api.crowdsec.net/v2/ ' ;
1919
2020 /** @var string The last version of this library */
21- public const VERSION = 'v0.7 .0 ' ;
21+ public const VERSION = 'v0.8 .0 ' ;
2222
2323 /** @var string The user agent used to send request to LAPI or CAPI */
2424 public const BASE_USER_AGENT = 'PHP CrowdSec Bouncer/ ' .self ::VERSION ;
You can’t perform that action at this time.
0 commit comments