Skip to content

Commit

Permalink
Update changelog + add changelog check into CI
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Varlakov <[email protected]>
  • Loading branch information
survived committed Oct 15, 2024
1 parent aaaefc4 commit b75b014
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
22 changes: 22 additions & 0 deletions .github/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

m_branch=m;
changelog_file=CHANGELOG.md;

# fetch master since we might be in a shallow clone
git fetch origin "$m_branch:$m_branch" --depth=1

changed=0;
for log in */"$changelog_file"; do
dir=$(dirname "$log");
# check if version changed
if git diff "$m_branch" -- "$dir/Cargo.toml" | grep -q "^-version = "; then
# check if changelog updated
if git diff --exit-code --no-patch "$m_branch" -- "$log"; then
echo "$dir version changed, but $log is not updated"
changed=1;
fi
fi
done

exit "$changed";
9 changes: 3 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,10 @@ jobs:
cache-on-failure: "true"
- name: Run clippy
run: cargo clippy -- -D clippy::all
dry-publish:
check-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
- name: Run dry publish
run: cargo publish --dry-run
- name: Check changelogs
run: ./.github/changelog.sh

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# hd-wallet crate changelog

## v0.5.0
* The first release of `hd-wallet`, successor of `slip-10` crate. It has all functionality of
`slip-10` plus special Edwards derivation that works with Ed25519 curve [#8]

[#8]: https://github.com/LFDT-Lockness/hd-wallet/pull/8

# slip-10 crate changelog

`slip-10` crate has been restructured and renamed into `hd-wallet`

## v0.4.0
* Update `generic-ec` dep to `v0.4` [#7]

Expand Down

0 comments on commit b75b014

Please sign in to comment.