File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 3
3
from pathlib import Path
4
4
5
5
TAG = os .environ ["TAG" ]
6
- VERSION = TAG [1 :]
7
6
8
7
9
8
def main ():
10
- print (f"Preparing changelog for { TAG } " )
9
+ print (f"Preparing changelog for v { TAG } " )
11
10
changelog = Path ("CHANGELOG.md" )
12
11
13
12
with changelog .open () as f :
@@ -18,7 +17,7 @@ def main():
18
17
line = lines [i ]
19
18
if line .startswith ("## Unreleased" ):
20
19
insert_index = i + 1
21
- elif line .startswith (f"## [v{ VERSION } ]" ):
20
+ elif line .startswith (f"## [v{ TAG } ]" ):
22
21
print ("CHANGELOG already up-to-date" )
23
22
return
24
23
elif line .startswith ("## [v" ):
@@ -30,7 +29,7 @@ def main():
30
29
lines .insert (insert_index , "\n " )
31
30
lines .insert (
32
31
insert_index + 1 ,
33
- f"## [v{ VERSION } ](https://github.com/stefanlogue/meteor/releases/tag/v{ VERSION } ) - "
32
+ f"## [v{ TAG } ](https://github.com/stefanlogue/meteor/releases/tag/v{ TAG } ) - "
34
33
f"{ datetime .now ().strftime ('%Y-%m-%d' )} \n " ,
35
34
)
36
35
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- export TAG=$( svu next)
5
+ export TAG=$( svu next --strip-prefix )
6
6
7
7
read -p " Creating new release for $TAG . Do you want to continue? [Y/n] " prompt
8
8
9
9
if [[ $prompt == " y" || $prompt == " Y" || $prompt == " yes" || $prompt == " Yes" ]]; then
10
- python scripts/prepare_changelog.py
11
- git add CHANGELOG.md
12
- git commit -m " chore: bump version to $TAG for release" || true && git push
13
- echo " Creating new git tag $TAG "
14
- git tag " $TAG " -m " $TAG "
15
- git push --tags
10
+ python scripts/prepare_changelog.py
11
+ git add CHANGELOG.md
12
+ git commit -m " chore: bump version to $TAG for release" || true && git push
13
+ echo " Creating new git tag $TAG "
14
+ git tag " $TAG " -m " $TAG "
15
+ git push --tags
16
16
else
17
- echo " Cancelled"
18
- exit 1
17
+ echo " Cancelled"
18
+ exit 1
19
19
fi
You can’t perform that action at this time.
0 commit comments