Skip to content

Commit

Permalink
prevent exception on generating release
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikk155 committed May 21, 2024
1 parent 5f38ef7 commit 6ead131
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CustomPrecache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Release
env:
TOKEN: ${{ secrets.TOKEN }}
run: python3 build/run.py CustomPrecache
run: python3 build/run.py CustomPrecache
10 changes: 6 additions & 4 deletions build/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ def ReleaseTag( file ):

changelog = os.path.join( os.path.dirname(__file__), f'../changelog/{file}.md' )

with open( changelog, 'r') as cl:
if os.path.exists( changelog ):

for line in cl.readlines():
with open( changelog, 'r') as cl:

new_body = f'{new_body}{line}'
for line in cl.readlines():

cl.close()
new_body = f'{new_body}{line}'

cl.close()

if new_body:
release.update_release(release.title, new_body)
Expand Down

0 comments on commit 6ead131

Please sign in to comment.