Skip to content

Commit 0837beb

Browse files
ahmetbk8s-ci-robot
authored andcommitted
Remove krew.zip from release, add krew.exe (#339)
This patch removes krew.zip (previously used in krew.yaml as well as windows installation instructions) and adds: - krew.exe (to be used in first-time installation on windows) - krew.exe.sha256 (checksum file) Signed-off-by: Ahmet Alp Balkan <[email protected]>
1 parent 9463c6c commit 0837beb

File tree

5 files changed

+23
-24
lines changed

5 files changed

+23
-24
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ deploy:
3434
on:
3535
tags: true
3636
file:
37+
- out/krew.yaml
3738
- out/krew.tar.gz
3839
- out/krew.tar.gz.sha256
39-
- out/krew.zip
40-
- out/krew.zip.sha256
41-
- out/krew.yaml
40+
- out/krew.exe
41+
- out/krew.exe.sha256
4242
api_key:
4343
secure: t4a69ruCl15etso89c/GSone/gEvWnG6+w4q6NUhjViVaJJuIFDth1C1KxuF/wWW9r2R6zpGNj1uEhfXlc1VB1gGJnq/dkxW7iiVpjPFZUpBYJlK49esrytTGmlNuoKSlX4WTyXEgyH/zui8psJdeVhdDu4yCDrWdkb54gjyp7enluvPNxD40naGybeCNUfWLHvbCOQU4zPQIS2E2Sb7IPlup4LfcUDZYoGuGiBxN9nbU4GOk5gYB1jcQ2j2bDdWtEqp0T19auyWtv/gkU7Mn6Ebt+PG3OxBuyVbw2rq0eB7SeR/6lSrkj2TX4jiMsStNRE+W7Es3t+b8BSOLJcXfi7GA2iyDA70vZYS97bo8TCnezKr65O39ADtmgjVAx+eGOUhuOJj3d1Ft6yK7EILaYMq9zy90EyeMTcuqekFSUo8b1dnyP3fgkDyEyZ0YUiTlUUDkjJO+m+kMqoGH4FpkTgD+JmsXNTBzJ9PpRhP6d/Ti8OuwtjT7iEGmgp5aqPTti01vcxDK7xremNx5Vbqd7QHwFvOcJFPD9oF7rEMbFLpGfn61YHqefGnAxAItLmAOeMAH8A1j5xByB/4NsCukKJSJc3is0ClGL/d44BmeVtVrCM6/0lsCSOfyC5ph2f8o/yyC/26ShFsDyN6vB57VWTzXbUm3ybaT3GgRFTyC+Q=

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ Check out the list of [kubectl plugins available on krew][list] or just run
9494
**Windows:**
9595

9696
1. Make sure `git` is installed on your system.
97-
1. Download `krew.zip` and `krew.yaml` from the [Releases][releases] page.
98-
1. Extract the `krew.zip` archive to a directory, navigate to the directory.
99-
1. Launch a command-line window (`cmd.exe`) in that directory.
97+
1. Download `krew.exe` and `krew.yaml` from the [Releases][releases] page to
98+
a directory.
99+
1. Launch a command-line window (`cmd.exe`) and navigate to that directory.
100100
1. Run the following command to install krew (pass the correct
101101
paths to `krew.yaml` and `krew.zip` below):
102102

103-
.\krew-windows_amd64.exe install --manifest=krew.yaml --archive=krew.zip
103+
krew install --manifest=krew.yaml
104104

105-
1. Add `%USERPROFILE%\.krew\bin` to your `PATH` environment variable
105+
1. Add `%USERPROFILE%\.krew\bin` directory to your `PATH` environment variable
106106
([how?](https://java.com/en/download/help/path.xml))
107107

108108
[releases]: https://github.com/kubernetes-sigs/krew/releases

hack/krew.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ spec:
6464
matchLabels:
6565
os: linux
6666
arch: arm
67-
- uri: https://github.com/kubernetes-sigs/krew/releases/download/KREW_TAG/krew.zip
68-
sha256: KREW_ZIP_CHECKSUM
67+
- uri: https://github.com/kubernetes-sigs/krew/releases/download/KREW_TAG/krew.tar.gz
68+
sha256: KREW_TAR_CHECKSUM
6969
bin: krew.exe
7070
files:
7171
- from: ./krew-windows_amd64.exe

hack/make-release-artifacts.sh

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ if [[ ! -d "${bin_dir}" ]]; then
2626
fi
2727

2828
krew_tar_archive="krew.tar.gz"
29-
krew_zip_archive="krew.zip"
29+
krew_exe="krew.exe"
30+
31+
# create a out/krew.exe convenience copy
32+
if [[ -x "./${bin_dir}/krew-windows_amd64.exe" ]]; then
33+
cp -- "./${bin_dir}/krew-windows_amd64.exe" "./out/krew.exe"
34+
fi
3035

3136
# consistent timestamps for files in bindir to ensure consistent checksums
3237
while IFS= read -r -d $'\0' f; do
@@ -40,11 +45,6 @@ echo >&2 "Creating ${krew_tar_archive} archive."
4045
cd "${bin_dir}"
4146
GZIP=-n tar czvf "${SCRIPTDIR}/../out/${krew_tar_archive}" ./*
4247
)
43-
echo >&2 "Creating ${krew_zip_archive} archive."
44-
(
45-
cd "${bin_dir}"
46-
zip -X -q --verbose "${SCRIPTDIR}/../out/${krew_zip_archive}" ./*
47-
)
4848

4949
checksum_cmd="shasum -a 256"
5050
if hash sha256sum 2>/dev/null; then
@@ -57,11 +57,11 @@ echo >&2 "${krew_tar_archive} checksum: ${tar_checksum}"
5757
echo "${tar_checksum}" >"${tar_sumfile}"
5858
echo >&2 "Written ${tar_sumfile}."
5959

60-
zip_sumfile="out/${krew_zip_archive}.sha256"
61-
zip_checksum="$(eval "${checksum_cmd[@]}" "out/${krew_zip_archive}" | awk '{print $1;}')"
62-
echo >&2 "${krew_zip_archive} checksum: ${zip_checksum}"
63-
echo "${zip_checksum}" >"${zip_sumfile}"
64-
echo >&2 "Written ${zip_sumfile}."
60+
exe_sumfile="out/krew.exe.sha256"
61+
exe_checksum="$(eval "${checksum_cmd[@]}" "out/${krew_exe}" | awk '{print $1;}')"
62+
echo >&2 "${krew_exe} checksum: ${exe_checksum}"
63+
echo "${exe_checksum}" >"${exe_sumfile}"
64+
echo >&2 "Written ${tar_sumfile}."
6565

6666
# Copy and process krew manifest
6767
git_describe="$(git describe --tags --dirty --always)"
@@ -72,7 +72,6 @@ if [[ ! "${git_describe}" =~ v.* ]]; then
7272
fi
7373
krew_version="${TAG_NAME:-$git_describe}"
7474
cp ./hack/krew.yaml ./out/krew.yaml
75-
sed -i "s/KREW_ZIP_CHECKSUM/${zip_checksum}/g" ./out/krew.yaml
7675
sed -i "s/KREW_TAR_CHECKSUM/${tar_checksum}/g" ./out/krew.yaml
7776
sed -i "s/KREW_TAG/${krew_version}/g" ./out/krew.yaml
7877
echo >&2 "Written out/krew.yaml."

hack/make-release-notes.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ download_base="https://github.com/kubernetes-sigs/krew/releases/download"
2929
download_assets=(
3030
krew.tar.gz
3131
krew.tar.gz.sha256
32-
krew.zip
33-
krew.zip.sha256
32+
krew.exe
33+
krew.exe.sha256
3434
krew.yaml
3535
)
3636

0 commit comments

Comments
 (0)