FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
utPLSQL/.github/scripts/update_changelog.sh at develop · utPLSQL/utPLSQL · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
utPLSQL
/
utPLSQL
Public
Notifications
You must be signed in to change notification settings
Fork
189
Star
622
Code
Issues
12
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
utPLSQL
/
.github
/
scripts
/
update_changelog.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
36 lines (27 loc) · 984 Bytes
Breadcrumbs
utPLSQL
/
.github
/
scripts
/
update_changelog.sh
Copy path
File metadata and controls
executable file
·
36 lines (27 loc) · 984 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!
/bin/bash
#
Updates CHANGELOG.md by prepending a new section for the release.
#
#
Required environment variables:
#
RELEASE_TAG - e.g. v3.2.3
#
RELEASE_BODY - markdown release notes
#
RELEASE_DATE - ISO-8601 date string (only the first 10 chars are used)
#
TARGET_BRANCH - branch to push the updated changelog to
set
-euo pipefail
python3 -
<<
'
PYEOF
'
import os
tag = os.environ['RELEASE_TAG']
body = os.environ['RELEASE_BODY'].strip()
date = os.environ['RELEASE_DATE'][:10]
new_section = f"## [{tag}] - {date}\n\n{body}\n\n---\n\n"
with open('CHANGELOG.md', 'r') as f:
content = f.read()
marker = '\n---\n'
pos = content.index(marker) + len(marker)
updated = content[:pos] + '\n' + new_section + content[pos:]
with open('CHANGELOG.md', 'w') as f:
f.write(updated)
print(f"Added {tag} to CHANGELOG.md")
PYEOF
git add CHANGELOG.md
git commit -m
"
Add release notes for
${RELEASE_TAG}
to CHANGELOG.md [skip ci]
"
git push origin HEAD:
"
${TARGET_BRANCH}
"
Back
|
FazBrowse Home
|
New Git URL