Skip to content

Commit

Permalink
added goreleaser
Browse files Browse the repository at this point in the history
Signed-off-by: bishal7679 <[email protected]>
  • Loading branch information
bishal7679 committed May 14, 2023
1 parent c6ae302 commit ebe7aa5
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
dist
28 changes: 28 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
project_name: ksapify

builds:
- binary: ksapify
id: "ksapify-primary"
main: ./cli
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w -X "github.com/bishal7679/ksapify/cli/cmd.BuildDate={{.Env.DATE}}"
- -s -w -X "github.com/bishal7679/ksapify/cli/cmd.Version={{.Env.VERSION}}"
env:
- CGO_ENABLED=0
signs:
- cmd: cosign
certificate: "${artifact}.cert"
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
- --yes
artifacts: all
output: true
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
GOOS_LINUX = linux
GOOS_WINDOWS = windows
# GOOS_WINDOWS = windows
GOOS_MACOS = darwin

GOARCH_LINUX = amd64
GOARCH_WINDOWS = amd64
# GOARCH_WINDOWS = amd64
GOARCH_MACOS = arm64

MOD_PERM = chmod +x ./builder.sh

install_linux:
${MOD_PERM}
env GOOS=${GOOS_LINUX} GOARCH=${GOARCH_LINUX} ./builder.sh

install_macos:
${MOD_PERM}
env GOOS=${GOOS_MACOS} GOARCH=${GOARCH_MACOS} ./builder.sh

uninstall:
chmod +x ./uninstall.sh
./uninstall.sh
Empty file modified builder.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/bin/bash
Empty file modified uninstall.sh
100644 → 100755
Empty file.

0 comments on commit ebe7aa5

Please sign in to comment.