Skip to content

Commit

Permalink
fix contributors list in release notes (#830)
Browse files Browse the repository at this point in the history
* fix contributors list in release notes

* update checkout action

* pass previous tag to release-notes tool and update release docs

* update release instructions
  • Loading branch information
chriskim06 committed Aug 9, 2023
1 parent 343e657 commit d2e660d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install dependencies
run: go mod download
Expand Down
24 changes: 6 additions & 18 deletions docs/RELEASING_KREW.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,10 @@ Krew tags versions starting with `v`. Example: `v0.2.0-rc.1`.

1. **Create a release commit:**

git commit -am "Release ${TAG:?TAG required}" --allow-empty

1. **Push PR and merge changes**: The repository hooks forbid direct pushes to
master, so the changes from the previous step need to be pushed and merged
as a regular PR.

git push origin master
```sh
git commit -am "Release ${TAG:?TAG required}" --allow-empty
git push origin master
```

(Only repository administrators can directly push to master branch.)

Expand All @@ -47,16 +44,7 @@ Krew tags versions starting with `v`. Example: `v0.2.0-rc.1`.

1. **Tag the release:**

```sh
git fetch origin
git reset --hard origin/master # when the previous merge is done
release_notes="$(TAG=$TAG hack/make-release-notes.sh)"
git tag -a "${TAG:?TAG required}" -m "${release_notes}"
```

1. **Verify the release instructions:**

git show "${TAG:?TAG required}"
git tag "${TAG:?TAG required}"

1. **Push the tag:**

Expand All @@ -76,7 +64,7 @@ Krew tags versions starting with `v`. Example: `v0.2.0-rc.1`.

1. **Update krew-index CI**: The CI tests for `krew-index` repository relies on
tools from main `krew` repository, and they should use the latest version.
When there's a new version, update the `.travis.yml` in `krew-index` repo.
When there's a new version, update `.github/workflows/ci.yml` in `krew-index` repo.

## Release artifacts

Expand Down
7 changes: 4 additions & 3 deletions hack/make-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,18 @@ for f in "${download_assets[@]}"; do
done
echo
echo "Thanks to our contributors for helping out with ${TAG}:"
git log "$(git describe --tags --abbrev=0)..HEAD" --format=%an |
previous_version="$(git describe --tags --match 'v*' --abbrev=0 "${TAG}^")"
git log "${previous_version}..${TAG}" --format=%an |
sort | uniq -c | sort -rn |
sed -E 's,^(\s+[0-9]+\s),- ,g'
echo
echo "(krew ${TAG} is tagged on $(date -u).)"
echo "(krew ${TAG} was tagged on $(date -u).)"
echo
echo '<details>'
echo '<summary>Merged pull requests</summary>'
echo # this empty line is important for correct markdown rendering
# you can pass your github token with --token here if you run out of requests

"${gopath}/bin/release-notes" kubernetes-sigs krew
"${gopath}/bin/release-notes" kubernetes-sigs krew --since "${previous_version}"
echo '</details>'
echo

0 comments on commit d2e660d

Please sign in to comment.