Remove -buildmode=pie flag

This commit is contained in:
ayntgl 2022-09-26 21:54:56 +05:30
parent 259b583712
commit b54dc12d31
2 changed files with 11 additions and 17 deletions

View file

@ -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) }}

View file

@ -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)