Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/changelog/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
changelog.md
13 changes: 13 additions & 0 deletions scripts/changelog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

Currently, the changelog is built locally.
Run:

```
./changelog.sh <ref_since>
```

For instance:
```
./changelog.sh statemine_v4
```
11 changes: 11 additions & 0 deletions scripts/changelog/changelog.sh
Original file line number Diff line number Diff line change
@@ -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