Skip to content

Commit

Permalink
build a static binary when releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
briceburg committed Jan 9, 2017
1 parent 67d3c4c commit 58e9035
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ uninstall:

RELEASE_TAG ?= $(shell git rev-parse --abbrev-ref HEAD)
RELEASE_SHA ?= $(shell git rev-parse --short HEAD)
BUILD_OPTS =

.PHONY: $(NAMESPACE) compile-%

Expand All @@ -62,7 +63,7 @@ compile-%: clean-%
--in-place=.bak \
src/Options/Utils.hs ; \
PATH="$(CURDIR)/dist:$$PATH" ; \
stack install --system-ghc --local-bin-path dist dockmaster:exe:$* ; \
stack install --system-ghc --local-bin-path dist $(BUILD_OPTS) dockmaster:exe:$* ; \
mv src/Options/Utils.hs.bak src/Options/Utils.hs \
)

Expand Down Expand Up @@ -108,9 +109,11 @@ REMOTE_GH:=origin
REMOTE_LOCAL:=local

prerelease: PRERELEASE = true
prerelease: BUILD_OPTS = --ghc-options '-fPIC -optl-static -optl-pthread'
prerelease: _mkrelease

release: PRERELEASE = false
release: BUILD_OPTS = --ghc-options '-fPIC -optl-static -optl-pthread'
release: _mkrelease

_mkrelease: RELEASE_TAG = v$(RELEASE_VERSION)$(shell $(PRERELEASE) && echo '-pr')
Expand Down

0 comments on commit 58e9035

Please sign in to comment.