Feat/release changelog spdx - #26
Merged
Merged
Conversation
How frost-planner's release automation, changelog generation and SPDX headers should look once they are ported into this template.
Checked the spec's assumptions against the real tools first and fixed a few: reuse ignores the root LICENSE and empty files, and the changelog and release tox envs have to stay out of env_list so a bare `tox` can never cut a release by accident.
The shebang hook checks the file mode in the git index, so the new scripts need `git add --chmod=+x`.
A pre-commit hook writes the SPDX header into Python files that are missing one, and REUSE.toml covers everything else in bulk. A second hook fails the commit if anything is left unlicensed.
LICENSE held Unlicense text while pyproject declared BSD-2-Clause. BSD-2-Clause is the right one, so the plan no longer copies the root file. It also now adds the REUSE.toml override that stops reuse reading the SPDX tags quoted in the plan's own code blocks as real annotations.
LICENSE carried Unlicense text under a BSD-2-Clause name. Both it and LICENSES/BSD-2-Clause.txt now hold the real BSD-2-Clause text. The plan docs also get their own REUSE.toml block, so the SPDX tags quoted inside them stop being picked up as annotations.
They went in unformatted, so pre-commit failed on an otherwise clean tree -- and with fail_fast that killed the run before reuse got to check anything.
Adds cliff.toml, a small wrapper script and a `tox -e changelog` env. The commit type prefix decides which section an entry lands in.
git-cliff refuses --prepend without a commit range, which is exactly the no-previous-tag case, so release.py would have failed on the first release it ever ran. It uses -o for a full render instead, which also writes the `# Changelog` header.
A bare `# Changelog` line does not match the configured header, so --prepend adds a second one at the bottom rather than recognising it. Noted in cliff.toml for anyone running git-cliff by hand.
One command to bump the version, refresh the lockfile and changelog, then commit and tag. --dry-run shows what it would do, and it refuses to run on a dirty tree or over an existing tag.
Pushing a v* tag builds the distributions, pulls that version's section out of the changelog for the release notes, and publishes the release with the wheel and sdist attached. PyPI publishing is there but left commented out.
New projects get their own copyright holder written into every file that carries one, and the release workflow is now part of what the bootstrap script knows about.
The plan and spec docs under docs/superpowers/ are in no toctree and quote code sphinx cannot highlight, and with -W that is a build failure. It was breaking tox -e docs, the docs workflow and the template smoke test.
The smoke test now checks that a generated project has no placeholders left in any of the new files, and that its package modules carry the new project's copyright holder rather than the template's.
Walks through the three pieces of automation in the order you meet them: how to commit, how license headers get added for you, and how to cut a release. Also fixes CONTRIBUTING.md, which still told people to edit CHANGELOG.md by hand.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.