Skip to content

Commit

Permalink
Use goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinvaneyk committed Jan 17, 2020
1 parent 7186ffa commit c5aa752
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
# Dependency directories (remove the comment below to include it)
# vendor/

bin/
bin/
dist/
29 changes: 29 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
before:
hooks:
- go mod download
builds:
- id: kubectl-tap
main: ./cmd/kubectl-tap
binary: kubectl-tap
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
ignore:
- goos: darwin
goarch: arm64
- goos: windows
goarch: arm64

archives:
- builds:
- kubectl-tap
name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
wrap_in_directory: false
format: tar.gz
files:
- LICENSE
44 changes: 44 additions & 0 deletions .krew.tmpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: tap
spec:
version: $VERSION
shortDescription: Updates objects to trigger reconcillation loops of watching controllers.
homepage: https://github.com/erwinvaneyk/kubetap
description: |
This plugin is roughly equivalent to `kubectl annotate pod tapped=$(date)`
with the use case to trigger a new controller evaluation of the target objects.
It does this by updating an annotation--by default the key `tapped`--of the
object.
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
uri: https://github.com/erwinvaneyk/kubectl-tap/releases/download/${VERSION}/kubectl-tap_${VERSION}_darwin_amd64.tar.gz
sha256: ${SHA256_DARWIN}
files:
- from: "*"
to: "."
bin: kubectl-tap
- selector:
matchLabels:
os: linux
arch: amd64
uri: https://github.com/erwinvaneyk/kubectl-tap/releases/download/${VERSION}/kubectl-tap_${VERSION}_linux_amd64.tar.gz
sha256: ${SHA256_LINUX}
files:
- from: "*"
to: "."
bin: kubectl-tap
- selector:
matchLabels:
os: windows
arch: amd64
uri: https://github.com/erwinvaneyk/kubectl-tap/releases/download/${VERSION}/kubectl-tap_${VERSION}_windows_amd64.tar.gz
sha256: ${SHA256_WINDOWS}
files:
- from: "*"
to: "."
bin: kubectl-tap.exe
11 changes: 0 additions & 11 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ long as `kubectl-tap` is present under your PATH.

Install a prebuilt binary from one of the [releases](https://github.com/erwinvaneyk/kubectl-tap/releases):
```bash
OS=darwin # options: [darwin, linux]
OS=darwin # options: [darwin, linux, windows]
curl -fsSL -o kubectl-tap https://github.com/erwinvaneyk/kubectl-tap/releases/download/v0.1.0/kubectl-tap-$OS-amd64
chmod u+x ./kubectl-tap
mv ./kubectl-tap /usr/local/bin
Expand Down

0 comments on commit c5aa752

Please sign in to comment.