static-linux: allow setting TREE to build from arbitrary git commit.
This commit is contained in:
parent
18ff3db1f0
commit
5922237b58
2 changed files with 4 additions and 2 deletions
|
@ -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' \
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue