mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
feat: build with safe tag
This commit is contained in:
parent
924bc01c07
commit
680e0cdd33
@ -1,3 +1,5 @@
|
||||
version: 2
|
||||
|
||||
project_name: contentserver
|
||||
|
||||
release:
|
||||
@ -8,6 +10,9 @@ release:
|
||||
|
||||
builds:
|
||||
- binary: contentserver
|
||||
main: ./main.go
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- windows
|
||||
- darwin
|
||||
@ -17,35 +22,30 @@ builds:
|
||||
- arm64
|
||||
goarm:
|
||||
- '7'
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
main: ./main.go
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags: -s -w -X github.com/foomo/contentserver/cmd.version={{.Version}}
|
||||
- -tags=safe
|
||||
ldflags:
|
||||
- -s -w -X github.com/foomo/contentserver/cmd.version={{.Version}}
|
||||
|
||||
archives:
|
||||
- format: tar.gz
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
|
||||
changelog:
|
||||
use: github-native
|
||||
|
||||
brews:
|
||||
# Repository to push the tap to.
|
||||
- repository:
|
||||
owner: foomo
|
||||
name: homebrew-tap
|
||||
caveats: "sesamy --help"
|
||||
caveats: "contentserver --help"
|
||||
homepage: "https://github.com/foomo/contentserver"
|
||||
description: "Serves content tree structures very quickly"
|
||||
test: |
|
||||
system "#{bin}/contentserver --version"
|
||||
system "#{bin}/contentserver version"
|
||||
|
||||
dockers:
|
||||
- use: buildx
|
||||
|
||||
8
Makefile
8
Makefile
@ -27,12 +27,12 @@ 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 ./... | gotestfmt
|
||||
|
||||
.PHONY: test.update
|
||||
## Run tests and update snapshots
|
||||
test.update:
|
||||
@GO_TEST_TAGS=-skip go test -update -coverprofile=coverage.out -race -json ./... | gotestfmt
|
||||
@GO_TEST_TAGS=-skip go test -update -tags=safe -coverprofile=coverage.out -race -json ./... | gotestfmt
|
||||
|
||||
.PHONY: lint
|
||||
## Run linter
|
||||
@ -57,13 +57,13 @@ outdated:
|
||||
.PHONY: install
|
||||
## Install binary
|
||||
install:
|
||||
@go build -o ${GOPATH}/bin/contentserver main.go
|
||||
@go build -tags=safe -o ${GOPATH}/bin/contentserver main.go
|
||||
|
||||
.PHONY: build
|
||||
## Build binary
|
||||
build:
|
||||
@mkdir -p bin
|
||||
@go build -o bin/contentserver main.go
|
||||
@go build -tags=safe -o bin/contentserver main.go
|
||||
|
||||
## === Utils ===
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user