Remove -buildmode=pie flag
This commit is contained in:
parent
259b583712
commit
b54dc12d31
2 changed files with 11 additions and 17 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -15,11 +15,8 @@ jobs:
|
|||
with:
|
||||
go-version: '^1.19'
|
||||
|
||||
- name: Format
|
||||
run: make fmt
|
||||
|
||||
- name: Build
|
||||
run: make build
|
||||
run: make
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
|
||||
|
|
|
|||
23
Makefile
23
Makefile
|
|
@ -1,19 +1,16 @@
|
|||
.PHONY: build
|
||||
build:
|
||||
go build \
|
||||
-trimpath \
|
||||
-buildmode=pie \
|
||||
-ldflags "-s -w" \
|
||||
.
|
||||
FLAGS=-ldflags "-s -w"
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
go test -v ./...
|
||||
.PHONY: all
|
||||
all: clean fmt build
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
go clean
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
gofmt -d -e -s .
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
go clean
|
||||
.PHONY: build
|
||||
build:
|
||||
go build $(FLAGS)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue