mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Add script to generate simple changelogs (#668)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
changelog.md
|
||||
@@ -0,0 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
Currently, the changelog is built locally.
|
||||
Run:
|
||||
|
||||
```
|
||||
./changelog.sh <ref_since>
|
||||
```
|
||||
|
||||
For instance:
|
||||
```
|
||||
./changelog.sh statemine_v4
|
||||
```
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
REF1=$1
|
||||
|
||||
JSON=$(git log $REF1..HEAD \
|
||||
--pretty=format:'{ "commit": "%H", "short_sha": "%h", "author": "%an", "date": "%ad", "message": "%s"},' \
|
||||
$@ | \
|
||||
perl -pe 'BEGIN{print "{ \"since\": \"'${REF1}'\", \"commits\": ["}; END{print "]}"}' | \
|
||||
perl -pe 's/},]/}]/')
|
||||
|
||||
echo $JSON | tera --template templates/changelog.md --stdin | tee
|
||||
Reference in New Issue
Block a user