chore: add safe tag

This commit is contained in:
Kevin Franklin Kim 2025-04-11 10:26:11 +02:00
parent 36f9e0f81c
commit 9dc885eeb7
No known key found for this signature in database
2 changed files with 10 additions and 11 deletions

View File

@ -16,6 +16,7 @@ builds:
- '7'
flags:
- -trimpath
- -tags=safe
ldflags:
- -s -w -X github.com/foomo/sesamy-cli/cmd.version={{.Version}}
@ -23,10 +24,10 @@ release:
prerelease: auto
archives:
- format: tar.gz
- formats: [ tar.gz ]
format_overrides:
- goos: windows
format: zip
formats: [ zip ]
changelog:
use: github-native
@ -38,3 +39,5 @@ brews:
caveats: "sesamy --help"
homepage: "https://github.com/foomo/sesamy-cli"
description: "CLI utitlity to manage Server Side Tag Management"
test: |
system "#{bin}/sesamy --version"

View File

@ -1,10 +1,6 @@
.DEFAULT_GOAL:=help
.DEFAULT_GOAL := help
-include .makerc
# --- Config -----------------------------------------------------------------
export PATH := bin:$(PATH)
# --- Targets -----------------------------------------------------------------
# This allows us to accept extra arguments
@ -36,7 +32,7 @@ doc:
.PHONY: test
## Run tests
test:
@GO_TEST_TAGS=-skip go test -coverprofile=coverage.out -race -json ./... | gotestfmt
@GO_TEST_TAGS=-skip go test -tags=safe -coverprofile=coverage.out -race -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
.PHONY: lint
## Run linter
@ -62,17 +58,17 @@ outdated:
## Build binary
build:
@mkdir -p bin
@go build -o bin/sesamy main.go
@go build -tags=safe -o bin/sesamy main.go
.PHONY: install
## Install binary
install:
@go build -o ${GOPATH}/bin/sesamy main.go
@go build -tags=safe -o ${GOPATH}/bin/sesamy main.go
.PHONY: install.debug
## Install debug binary
install.debug:
@go build -gcflags "all=-N -l" -o ${GOPATH}/bin/sesamy main.go
@go build -tags=safe -gclags="all=-N -l" -o ${GOPATH}/bin/sesamy main.go
## === Utils ===