Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LICENSE to distribution #30

Merged
merged 1 commit into from
Nov 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ jobs:
chmod +x ~/bin/kubectl
- run: |
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b ~/bin v1.16.0
- run: |
go get github.com/int128/goxzst
- checkout
- run: make check
- run: bash <(curl -s https://codecov.io/bash)
- run: make run
- run: make dist
- run: |
if [ "$CIRCLE_TAG" ]; then
go get github.com/int128/goxzst
go get github.com/tcnksm/ghr
curl -L -o ~/bin/ghcp https://github.com/int128/ghcp/releases/download/v1.5.0/ghcp_linux_amd64
chmod +x ~/bin/ghcp
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,22 @@ run: $(TARGET_PLUGIN)
PATH=.:$(PATH) kubectl auth-proxy --help

dist:
VERSION=$(CIRCLE_TAG) goxzst -d dist/gh/ -o "$(TARGET)" -t "kauthproxy.rb auth-proxy.yaml" -- -ldflags "$(LDFLAGS)"
# make the zip files for GitHub Releases
VERSION=$(CIRCLE_TAG) goxzst -d dist/gh/ -i "LICENSE" -o "$(TARGET)" -t "kauthproxy.rb auth-proxy.yaml" -- -ldflags "$(LDFLAGS)"
zipinfo dist/gh/kauthproxy_linux_amd64.zip
# make the Homebrew formula
mv dist/gh/kauthproxy.rb dist/
# make the yaml for krew-index
mkdir -p dist/plugins
cp dist/gh/auth-proxy.yaml dist/plugins/auth-proxy.yaml

.PHONY: release
release: dist
# publish to GitHub Releases
ghr -u "$(CIRCLE_PROJECT_USERNAME)" -r "$(CIRCLE_PROJECT_REPONAME)" "$(CIRCLE_TAG)" dist/gh/
# publish to Homebrew tap repository
ghcp commit -u "$(CIRCLE_PROJECT_USERNAME)" -r "homebrew-$(CIRCLE_PROJECT_REPONAME)" -m "$(CIRCLE_TAG)" -C dist/ kauthproxy.rb
# fork krew-index and create a branch
ghcp fork-commit -u kubernetes-sigs -r krew-index -b "auth-proxy-$(CIRCLE_TAG)" -m "Bump auth-proxy to $(CIRCLE_TAG)" -C dist/ plugins/auth-proxy.yaml

.PHONY: clean
Expand Down
18 changes: 12 additions & 6 deletions auth-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ spec:
sha256: "{{ sha256 .linux_amd64_archive }}"
bin: kauthproxy
files:
- from: "kauthproxy"
to: "."
- from: kauthproxy
to: .
- from: LICENSE
to: .
selector:
matchLabels:
os: linux
Expand All @@ -32,8 +34,10 @@ spec:
sha256: "{{ sha256 .darwin_amd64_archive }}"
bin: kauthproxy
files:
- from: "kauthproxy"
to: "."
- from: kauthproxy
to: .
- from: LICENSE
to: .
selector:
matchLabels:
os: darwin
Expand All @@ -42,8 +46,10 @@ spec:
sha256: "{{ sha256 .windows_amd64_archive }}"
bin: kauthproxy.exe
files:
- from: "kauthproxy.exe"
to: "."
- from: kauthproxy.exe
to: .
- from: LICENSE
to: .
selector:
matchLabels:
os: windows
Expand Down