From b54dc12d311dda2dbc0ed154a66e884e57d3f777 Mon Sep 17 00:00:00 2001 From: ayntgl Date: Mon, 26 Sep 2022 21:54:56 +0530 Subject: [PATCH] Remove -buildmode=pie flag --- .github/workflows/ci.yml | 5 +---- Makefile | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd0ec5a..748a26f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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) }} diff --git a/Makefile b/Makefile index 0685a05..e57a522 100644 --- a/Makefile +++ b/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)