From fa008bef55a8ad17dc305b1606007335ec5433c0 Mon Sep 17 00:00:00 2001 From: Hidetake Iwata Date: Sat, 11 Apr 2020 17:14:00 +0900 Subject: [PATCH] Add linux_arm and linux_arm64 binary to distribution (#275) --- Makefile | 3 ++- dist/oidc-login.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4c55f32..f1c394e 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ GITHUB_USERNAME := $(CIRCLE_PROJECT_USERNAME) GITHUB_REPONAME := $(CIRCLE_PROJECT_REPONAME) TARGET := kubelogin +TARGET_OSARCH := linux_amd64 darwin_amd64 windows_amd64 linux_arm linux_arm64 VERSION ?= $(CIRCLE_TAG) LDFLAGS := -X main.version=$(VERSION) @@ -21,7 +22,7 @@ check: dist: dist/output dist/output: # make the zip files for GitHub Releases - VERSION=$(VERSION) CGO_ENABLED=0 goxzst -d dist/output -i "LICENSE" -o "$(TARGET)" -t "dist/kubelogin.rb dist/oidc-login.yaml dist/Dockerfile" -- -ldflags "$(LDFLAGS)" + VERSION=$(VERSION) CGO_ENABLED=0 goxzst -d dist/output -i "LICENSE" -o "$(TARGET)" -osarch "$(TARGET_OSARCH)" -t "dist/kubelogin.rb dist/oidc-login.yaml dist/Dockerfile" -- -ldflags "$(LDFLAGS)" # test the zip file zipinfo dist/output/kubelogin_linux_amd64.zip # make the krew yaml structure diff --git a/dist/oidc-login.yaml b/dist/oidc-login.yaml index 441e196..d97b35a 100644 --- a/dist/oidc-login.yaml +++ b/dist/oidc-login.yaml @@ -62,3 +62,27 @@ spec: matchLabels: os: windows arch: amd64 + - uri: https://github.com/int128/kubelogin/releases/download/{{ env "VERSION" }}/kubelogin_linux_arm.zip + sha256: "{{ sha256 .linux_arm_archive }}" + bin: kubelogin + files: + - from: kubelogin + to: . + - from: LICENSE + to: . + selector: + matchLabels: + os: linux + arch: arm + - uri: https://github.com/int128/kubelogin/releases/download/{{ env "VERSION" }}/kubelogin_linux_arm64.zip + sha256: "{{ sha256 .linux_arm64_archive }}" + bin: kubelogin + files: + - from: kubelogin + to: . + - from: LICENSE + to: . + selector: + matchLabels: + os: linux + arch: arm64