File tree 3 files changed +10
-4
lines changed
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>
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
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class Constants
18
18
public const CAPI_URL = 'https://api.crowdsec.net/v2/ ' ;
19
19
20
20
/** @var string The last version of this library */
21
- public const VERSION = 'v0.7 .0 ' ;
21
+ public const VERSION = 'v0.8 .0 ' ;
22
22
23
23
/** @var string The user agent used to send request to LAPI or CAPI */
24
24
public const BASE_USER_AGENT = 'PHP CrowdSec Bouncer/ ' .self ::VERSION ;
You can’t perform that action at this time.
0 commit comments