Skip to content

Commit

Permalink
Add Apple Silicon binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Moser-ss committed Feb 23, 2022
1 parent 704f8d9 commit 2bcdaeb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TARGET := kubelogin
TARGET_PLUGIN := kubectl-kubelogin
CIRCLE_TAG ?= v1.15.3-pipedrive
CIRCLE_TAG ?= v1.15.5-pipedrive
LDFLAGS := -X main.version=$(CIRCLE_TAG)

all: $(TARGET)
Expand All @@ -21,16 +21,14 @@ run: $(TARGET_PLUGIN)
-PATH=.:$(PATH) kubectl kubelogin --help

dist:
VERSION=$(CIRCLE_TAG) goxzst -d dist/gh/ -o "$(TARGET)" -t "kubelogin.rb kubelogin.yaml" -- -ldflags "$(LDFLAGS)"
VERSION=$(CIRCLE_TAG) goxzst -d dist/gh/ -o "$(TARGET)" -osarch "linux_amd64 darwin_amd64 darwin_arm64 windows_amd64" -t "kubelogin.rb kubelogin.yaml" -- -ldflags "$(LDFLAGS)"
mv dist/gh/kubelogin.rb dist/
mkdir -p dist/plugins
cp dist/gh/kubelogin.yaml dist/plugins/kubelogin.yaml

.PHONY: release
release: dist
ghr -u "$(GITHUB_USERNAME)" -r kubelogin "$(CIRCLE_TAG)" dist/gh/
# ghcp commit -u "$(CIRCLE_PROJECT_USERNAME)" -r "homebrew-$(CIRCLE_PROJECT_REPONAME)" -m "$(CIRCLE_TAG)" -C dist/ kubelogin.rb
# ghcp fork-commit -u kubernetes-sigs -r krew-index -b "oidc-login-$(CIRCLE_TAG)" -m "Bump oidc-login to $(CIRCLE_TAG)" -C dist/ plugins/oidc-login.yaml
gh release --repo pipedrive/kubelogin create "$(CIRCLE_TAG)" dist/gh/*

.PHONY: clean
clean:
Expand Down
10 changes: 10 additions & 0 deletions kubelogin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ spec:
matchLabels:
os: darwin
arch: amd64
- uri: https://github.com/pipedrive/kubelogin/releases/download/{{ env "VERSION" }}/kubelogin_darwin_arm64.zip
sha256: "{{ sha256 .darwin_arm64_archive }}"
bin: kubelogin
files:
- from: "kubelogin"
to: "."
selector:
matchLabels:
os: darwin
arch: arm64
- uri: https://github.com/pipedrive/kubelogin/releases/download/{{ env "VERSION" }}/kubelogin_windows_amd64.zip
sha256: "{{ sha256 .windows_amd64_archive }}"
bin: kubelogin.exe
Expand Down

0 comments on commit 2bcdaeb

Please sign in to comment.