Skip to content

Commit

Permalink
chore: add CHANGELOG.md scripts (#26)
Browse files Browse the repository at this point in the history
Since apparently we never bothered to update this.
  • Loading branch information
DaniPopes authored Jan 10, 2024
1 parent 1ee9f34 commit 7425c08
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 5 deletions.
80 changes: 75 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,81 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0](https://github.com/foundry-rs/block-explorers/releases/tag/v0.1.0) - 2023-11-14
## [0.1.3](https://github.com/foundry-rs/compilers/releases/tag/v0.1.3) - 2024-01-05

### Added
### Bug Fixes

- Initial release, forked from [`ethers-etherscan`](https://crates.io/crates/ethers-etherscan)
- Migrated to Alloy ([#2])
- Dont force trailing url slash ([#25](https://github.com/foundry-rs/compilers/issues/25))

[#2]: https://github.com/foundry-rs/block-explorers/pull/2
### Miscellaneous Tasks

- Release 0.1.3

### Other

- Add `getcontractcreation` binding ([#24](https://github.com/foundry-rs/compilers/issues/24))
- Fix deserialization error resulting from Blockscout omitting "OptimizationRuns" field when optimization was not used ([#23](https://github.com/foundry-rs/compilers/issues/23))
- Fix deserialization failure when fetching contract source_code from blockscout ([#22](https://github.com/foundry-rs/compilers/issues/22))

## [0.1.2](https://github.com/foundry-rs/compilers/releases/tag/v0.1.2) - 2023-12-08

### Bug Fixes

- Sanitize all source entries ([#19](https://github.com/foundry-rs/compilers/issues/19))

### Miscellaneous Tasks

- 0.1.2 ([#20](https://github.com/foundry-rs/compilers/issues/20))

## [0.1.1](https://github.com/foundry-rs/compilers/releases/tag/v0.1.1) - 2023-11-23

### Dependencies

- Bump Alloy

### Miscellaneous Tasks

- Release 0.1.1
- [meta] Add CODEOWNERS

## [0.1.0](https://github.com/foundry-rs/compilers/releases/tag/v0.1.0) - 2023-11-15

### Bug Fixes

- Add licensing ([#4](https://github.com/foundry-rs/compilers/issues/4))
- [features] Remove ethers-solc for foundry-compilers ([#3](https://github.com/foundry-rs/compilers/issues/3))

### Dependencies

- Bump ethers ([#9](https://github.com/foundry-rs/compilers/issues/9))

### Documentation

- Add CHANGELOG.md

### Features

- Remove Ethers ([#14](https://github.com/foundry-rs/compilers/issues/14))
- Repo improvements ([#11](https://github.com/foundry-rs/compilers/issues/11))
- Alloy migration ([#2](https://github.com/foundry-rs/compilers/issues/2))
- [`CI`] Enable ci/cd ([#1](https://github.com/foundry-rs/compilers/issues/1))
- Repo init

### Miscellaneous Tasks

- [meta] Update configs ([#15](https://github.com/foundry-rs/compilers/issues/15))
- Remove RawAbi and LosslessAbi usage ([#12](https://github.com/foundry-rs/compilers/issues/12))
- Enable more lints ([#13](https://github.com/foundry-rs/compilers/issues/13))
- Remove default feats from openssl ([#7](https://github.com/foundry-rs/compilers/issues/7))
- Patch ethers to be in sync w/ foundry ([#6](https://github.com/foundry-rs/compilers/issues/6))
- Clippy ([#5](https://github.com/foundry-rs/compilers/issues/5))

### Other

- Update README.md

### Styling

- Update rustfmt config ([#16](https://github.com/foundry-rs/compilers/issues/16))

<!-- generated by git-cliff -->
52 changes: 52 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Configuration file for [`git-cliff`](https://github.com/orhun/git-cliff)
# See https://git-cliff.org/docs/configuration

[changelog]
header = """
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
"""
# https://tera.netlify.app/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}](https://github.com/foundry-rs/compilers/releases/tag/v{{ version | trim_start_matches(pat="v") }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | title }}
{% for commit in commits %}
- {% if commit.scope %}[{{ commit.scope }}] {% endif %}{{ commit.message | upper_first | split(pat="\\n") | first }}\
{% endfor %}
{% endfor %}\n
"""
trim = true
footer = "<!-- generated by git-cliff -->"

[git]
conventional_commits = true
filter_unconventional = false
commit_preprocessors = [
{ pattern = '#(\d+)', replace = "[#$1](https://github.com/foundry-rs/compilers/issues/$1)" },
]
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^doc", group = "Documentation" },
{ message = ".*\\b([Dd]eps|[Dd]ependencies|[Bb]ump)\\b", group = "Dependencies" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactor" },
{ message = ".*\\b(style|fmt|format)\\b", group = "Styling" },
{ message = "^test", group = "Testing" },
{ message = "^chore", group = "Miscellaneous Tasks" },

{ message = ".*", group = "Other" },
]
protect_breaking_commits = false
filter_commits = false
tag_pattern = "v[0-9]*"
skip_tags = "beta|alpha"
ignore_tags = "rc"
sort_commits = "newest"
12 changes: 12 additions & 0 deletions scripts/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e -o pipefail

root=$(dirname "$(dirname "$0")")
cmd=(git cliff --workdir "$root" --output "$root/CHANGELOG.md" "$@")

if [ "$DRY_RUN" = "true" ]; then
echo "skipping due to dry run: ${cmd[*]}" >&2
exit 0
else
"${cmd[@]}"
fi

0 comments on commit 7425c08

Please sign in to comment.