-
Notifications
You must be signed in to change notification settings - Fork 663
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
Feat: Pin external references on a release #1208
Merged
sajayantony
merged 2 commits into
opencontainers:main
from
sudo-bmitch:pr-pin-urls-on-release
Oct 31, 2024
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
cd "$(dirname $0)/.." | ||
|
||
if [ ! -x "$(command -v curl )" ] || [ ! -x "$(command -v jq )" ] || [ ! -x "$(command -v find )" ] || [ ! -x "$(command -v sed )" ]; then | ||
echo "This command requires the following to run: curl, find, jq, and sed" >&2 | ||
exit 1 | ||
fi | ||
|
||
runtime_tag=$(curl -L \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/opencontainers/runtime-spec/releases/latest \ | ||
| jq -r .tag_name) | ||
|
||
distribution_tag=$(curl -L \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/opencontainers/distribution-spec/releases/latest \ | ||
| jq -r .tag_name) | ||
|
||
find . -name '*.md' -exec sed -i \ | ||
-e "s#https://github.com/opencontainers/runtime-spec/blob/main/#https://github.com/opencontainers/runtime-spec/blob/${runtime_tag}/#g" \ | ||
-e "s#https://github.com/opencontainers/distribution-spec/blob/main/#https://github.com/opencontainers/distribution-spec/blob/${distribution_tag}/#g" \ | ||
'{}' \; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ Maintainers MUST send updates to the <[email protected]> with results of th | |
Before the specification reaches v1.0.0, the meetings SHOULD be weekly. | ||
Once a specification has reached v1.0.0, the maintainers may alter the cadence, but a meeting MUST be held within four weeks of the previous meeting. | ||
|
||
The release plans, corresponding milestones and estimated due dates MUST be published on GitHub (e.g. <https://github.com/opencontainers/runtime-spec/milestones>). | ||
The release plans, corresponding milestones and estimated due dates MUST be published on GitHub (e.g. <https://github.com/opencontainers/image-spec/milestones>). | ||
GitHub milestones and issues are only used for community organization and all releases MUST follow the [project governance](GOVERNANCE.md) rules and procedures. | ||
|
||
### Timelines | ||
|
@@ -53,18 +53,22 @@ Specifications have a variety of different timelines in their lifecycle. | |
Releases usually follow a few steps: | ||
|
||
- [ ] prepare a pull-request for the release | ||
- [ ] a commit updating `./ChangeLog` | ||
- [ ] generate a change log: | ||
- [ ] `git log --oneline --no-merges --decorate --name-status v1.0.1..HEAD | vim -` | ||
- [ ] `:% s/(pr\/\(\d*\))\(.*\)/\2 (#\1)/` to move the PR to the end of line and match previous formatting | ||
- [ ] review `(^M|^A|^D)` for impact of the commit | ||
- [ ] group commits to `Additions:`, `Minor fixes and documentation:`, `Breaking changes:` | ||
- [ ] delete the `(^M|^A|^D)` lines, `:%!grep -vE '(^M|^A|^D)'` | ||
- [ ] merge multi-commit PRs (so each line has a `(#num)` suffix) | ||
- [ ] drop hash and indent, `:'<,'> s/^\w* /^I* /` | ||
- [ ] a commit bumping `./specs-go/version.go` to next version and empty the `VersionDev` variable | ||
- [ ] a commit adding back the "+dev" to `VersionDev` | ||
- [ ] a commit for the release: | ||
- [ ] bump `./specs-go/version.go` to next version and empty the `VersionDev` variable | ||
- [ ] run `.tool/pin-release.sh` to pin the references to other specs | ||
- [ ] a commit to revert the main branch for development: | ||
- [ ] `git revert -n HEAD` | ||
- [ ] bump `./specs-go/version.go` to next version and set the `VersionDev` variable to `+dev` | ||
- [ ] send email to <[email protected]> | ||
- [ ] copy the exact commit hash for bumping the version from the pull-request (since master always stays as "-dev") | ||
- [ ] copy the exact commit hash for bumping the version from the pull-request (since master always stays as "+dev") | ||
- [ ] count the PRs since last release (that this version is tracking, in the cases of multiple branching), like `git log --pretty=oneline --no-merges --decorate $priorTag..$versionBumpCommit | grep \(pr\/ | wc -l` | ||
- [ ] get the date for a week from now, like `TZ=UTC date --date='next week'` | ||
- [ ] OPTIONAL find a cute animal gif to attach to the email, and subsequently the release description | ||
|
Oops, something went wrong.
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.
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.
You're going to change the list of commands, but in general, the
command
built-in is pretty well behaved so this can be somewhat simpler/cleaner too:or even: