Skip to content

Commit d2e660d

Browse files
authored
fix contributors list in release notes (#830)
* fix contributors list in release notes * update checkout action * pass previous tag to release-notes tool and update release docs * update release instructions
1 parent 343e657 commit d2e660d

File tree

3 files changed

+12
-21
lines changed

3 files changed

+12
-21
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323

2424
- name: Check out code into the Go module directory
2525
uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
2628

2729
- name: Install dependencies
2830
run: go mod download

docs/RELEASING_KREW.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ Krew tags versions starting with `v`. Example: `v0.2.0-rc.1`.
3232

3333
1. **Create a release commit:**
3434

35-
git commit -am "Release ${TAG:?TAG required}" --allow-empty
36-
37-
1. **Push PR and merge changes**: The repository hooks forbid direct pushes to
38-
master, so the changes from the previous step need to be pushed and merged
39-
as a regular PR.
40-
41-
git push origin master
35+
```sh
36+
git commit -am "Release ${TAG:?TAG required}" --allow-empty
37+
git push origin master
38+
```
4239

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

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

4845
1. **Tag the release:**
4946

50-
```sh
51-
git fetch origin
52-
git reset --hard origin/master # when the previous merge is done
53-
release_notes="$(TAG=$TAG hack/make-release-notes.sh)"
54-
git tag -a "${TAG:?TAG required}" -m "${release_notes}"
55-
```
56-
57-
1. **Verify the release instructions:**
58-
59-
git show "${TAG:?TAG required}"
47+
git tag "${TAG:?TAG required}"
6048

6149
1. **Push the tag:**
6250

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

7765
1. **Update krew-index CI**: The CI tests for `krew-index` repository relies on
7866
tools from main `krew` repository, and they should use the latest version.
79-
When there's a new version, update the `.travis.yml` in `krew-index` repo.
67+
When there's a new version, update `.github/workflows/ci.yml` in `krew-index` repo.
8068
8169
## Release artifacts
8270

hack/make-release-notes.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,18 @@ for f in "${download_assets[@]}"; do
7474
done
7575
echo
7676
echo "Thanks to our contributors for helping out with ${TAG}:"
77-
git log "$(git describe --tags --abbrev=0)..HEAD" --format=%an |
77+
previous_version="$(git describe --tags --match 'v*' --abbrev=0 "${TAG}^")"
78+
git log "${previous_version}..${TAG}" --format=%an |
7879
sort | uniq -c | sort -rn |
7980
sed -E 's,^(\s+[0-9]+\s),- ,g'
8081
echo
81-
echo "(krew ${TAG} is tagged on $(date -u).)"
82+
echo "(krew ${TAG} was tagged on $(date -u).)"
8283
echo
8384
echo '<details>'
8485
echo '<summary>Merged pull requests</summary>'
8586
echo # this empty line is important for correct markdown rendering
8687
# you can pass your github token with --token here if you run out of requests
8788

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

0 commit comments

Comments
 (0)