static-linux: allow setting TREE to build from arbitrary git commit.

This commit is contained in:
John MacFarlane 2017-03-19 10:24:25 +01:00
parent 18ff3db1f0
commit 5922237b58
2 changed files with 4 additions and 2 deletions

View file

@ -20,6 +20,7 @@ RUN stack install --stack-yaml stack.pkg.yaml --only-dependencies \
--test --ghc-options '-O2 -optc-Os -optl-static -fPIC' \
pandoc pandoc-citeproc
CMD git pull && \
git checkout -b work $TREE && \
export VERSION=`grep '^Version:' pandoc.cabal | awk '{print $$2;}'` && \
stack install --stack-yaml stack.pkg.yaml \
--local-bin-path /artifacts --flag 'pandoc:embed_data_files' \

View file

@ -1,11 +1,12 @@
TREE?=HEAD
ARTIFACTS=`pwd`/artifacts
build:
mkdir -p $(ARTIFACTS)
docker run -v $(ARTIFACTS):/artifacts alpine-pandoc
docker build -t alpine-pandoc .
docker run --env TREE=$(TREE) -v $(ARTIFACTS):/artifacts alpine-pandoc
setup:
docker pull alpine:edge
docker build -t alpine-pandoc .
.PHONY: build setup