Repository navigation
build(release): ship licence notices with the binary and image - #80
Merged
Merged
Conversation
The Go CLI ports github.com/devcontainers/cli and carries its test fixtures and updateUID.Dockerfile, which are MIT (Copyright (c) Microsoft Corporation); NOTICE now keeps that notice. The modules the binary links (MIT, BSD, Apache) ask that their notice go with every copy, so task release:notices writes THIRD_PARTY_NOTICES from go-licenses (pinned in versions.yaml) plus Go's own licence, and the archives and the image ship LICENSE.txt, NOTICE and THIRD_PARTY_NOTICES. release:smoke fails a release without them. LICENSE.txt's copyright line names The spin-stack Authors, as the other spin-stack repositories will. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The Go CLI is Apache-2.0, but it ports github.com/devcontainers/cli and carries material from it under MIT (Copyright (c) Microsoft Corporation): the fixtures in
src/test/configs/andinternal/docker/updateUID.Dockerfile, which the binary embeds. The MIT notice has to go with that material. The modules the binary links (MIT, BSD-2/3, Apache-2.0) also ask that their notice accompany every copy, including a compiled one. Until now, neither notice was in the repo or the release.NOTICE: names what comes from devcontainers/cli and carries its MIT text, verbatim from upstream'sLICENSE.txtat the pinnedreferencecommit.LICENSE.txt: the copyright line is nowCopyright The spin-stack Authors, the line every spin-stack repository will use.task release:notices: writesTHIRD_PARTY_NOTICES, with Go's own licence plus each linked module's licence text. It usesgo-licenses report(pinned inversions.yaml) and the template inhack/third-party-notices.tmpl. The output is byte-identical across runs. A module without a licence file fails the task..goreleaser.yml: runsrelease:noticesas abeforehook.archives.filesanddockers_v2.extra_filesshipLICENSE.txt,NOTICEandTHIRD_PARTY_NOTICES, and theDockerfilecopies them to/usr/share/doc/devcontainer-cli/.release:smoke: now also fails when an archive indist/or the published image is missing one of the three files.Archive names, image tags and the binary are unchanged. The archives gain three files beside the binary.
Validation:
goreleaser checkpassed.goreleaser release --snapshot --clean --skip=publish,docker,sbompassed. Both archives listLICENSE.txt NOTICE THIRD_PARTY_NOTICES devcontainer.RELEASE_VERSION=… task release:smoke: it passed. WithNOTICEremoved from an archive it fails with…: no NOTICE.task lintpassed, and so didgo test ./internal/devtools/ ./internal/cli/ -run 'Versions|Workflow'.🤖 Generated with Claude Code