-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Init Change Log fragments #584
Conversation
f190730
to
a818288
Compare
Thank you, Michal! For posterity, here's a transcript of a sync on Slack (minus the pleasantries). MichalWe are aming to use Change Log fragments in our main repos.
Mitja
I'm not 100% sure; but my impression is that we don't actually use the changelog-generating part of goreleaser anywhere, and it's only used to define how to build the binaries. This was set up before I joined nexus (by Nikhil, long since gone), so I'm no authority there, unfortunately.
We use the GitHub GUI (plus release.yaml in CI/CD). To create a release, we go to https://github.com/oasisprotocol/nexus/releases, click "Draft a new release" in the upper right corner, manually type in the new tag (= the next version), and use GitHub's "generate release notes" GUI button to achieve something similar to towncrier (but based on PR titles, rather than changelog fragments). Then GitHub automatically creates the new git tag at HEAD and triggers release.yaml.
In terms of tech: I can't think of any. Our current solution is not particularly customized, so hopefully it will be a smooth and easy transition. But also, let's try and see :), the stakes are low. Some other questions from my end:
|
In frontend repos we run scripts
Release tag validates if there are no change log fragments. Now I can see that Nexus is missing such make target (sample). I think we should add it, but it will require version in CLI as we don't use Punch tool here), so we may end up with something like
Requirement for this task was to force usage of Change Log fragments, but if you look at stack, other repos have some versioning tools like Punch tool. There are some additional linters (markdown or gitlint), make files targets etc. I guess ideal flow is when you work with all repos using more or less the same flow. So yeah, aligning linters and versioning tools would be a next step (Tadej has detailed plan for sure). At the same time such tasks have low prior so it's hard for me to predict when we will invest more time.
I think we will only add creating GitHub release with release notes task to the current workflow. goreleaser will stay, but without changelog which is not used from what I understood.
You can have simple release notes like in core or you can include all details from CHANGELOG.md (explorer). The problem with detailed option is that md file in repo and release notes parse white spaces differently and that action is cleaning stuff for GitHub release notes. Not sure that GitHub behavior was fixed lately, but you can copy any CHANGELOG.md to GitHub releases editor to see differences. |
It would be nice to have a little automation support here. When git fetch --tags
latest_version="$(git tag --list --merged 'v[0-9]\.[0-9]\.[0-9]' | sort --version-sort | tail -n1)"
next_version="$(echo "$latest_version" | awk 'BEGIN{FS=OFS="."} {print $1, $2, $3+1}')" # optional
echo "Latest published version is $latest_version. You are about to publish $next_version."
echo "If this is not what you want, re-run this command with VERSION=..." The rest LGTM, thank you! |
I was wrong about Github release part. Will follow other backend repos here. |
1a3925e
to
b7f452b
Compare
@mitjat (actually anyone who is interested) let's lock some time next sprint for testing this. I went through "auto bumping patch version" flow on my fork and commands seem Ok. |
b7f452b
to
8fd904d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, thank you!
Yeah let's merge it and test it out before or after one of our team syncs, if that works for you? If it's before, I just need advance warning :)
8fd904d
to
6dc9d8a
Compare
let's merge it after a team sync and early next sprint 🖖 |
6dc9d8a
to
cdd8cf3
Compare
Opening Draft PR, because I am not sure about requirements.During planning session we were talking about enforcing usage of Change Log fragments for now without other tools we usually combine with it (gitlint/punch etc).Release process will require running
changelog
andrelease-tag
with an optional version number.