Build RPM and Debian package with PIE mode enabled
This commit is contained in:
parent
1f3a9dabc2
commit
423e06cbe8
2 changed files with 2 additions and 6 deletions
2
Makefile
2
Makefile
|
@ -42,7 +42,7 @@ export PGPASSWORD := postgres
|
|||
debian-packages
|
||||
|
||||
miniflux:
|
||||
@ go build -ldflags=$(LD_FLAGS) -o $(APP) main.go
|
||||
@ go build -buildmode=pie -ldflags=$(LD_FLAGS) -o $(APP) main.go
|
||||
|
||||
linux-amd64:
|
||||
@ GOOS=linux GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-linux-amd64 main.go
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
FROM golang:1 AS build
|
||||
ADD . /go/src/app
|
||||
WORKDIR /go/src/app
|
||||
RUN go generate
|
||||
RUN go build \
|
||||
-o miniflux \
|
||||
-ldflags="-s -w -X 'miniflux.app/version.Version=`git describe --tags --abbrev=0`' -X 'miniflux.app/version.Commit=`git rev-parse --short HEAD`' -X 'miniflux.app/version.BuildDate=`date +%FT%T%z`'" \
|
||||
main.go
|
||||
RUN make miniflux
|
||||
|
||||
FROM centos:latest
|
||||
RUN dnf install -y rpm-build
|
||||
|
|
Loading…
Reference in a new issue