static-linux: allow setting TREE to build from arbitrary git commit.
commit5922237b5886e9d5a9f452ec43014dedf4534a2b
authorJohn MacFarlane <jgm@berkeley.edu>
dateSun 19 Mar 2017, 10:24 (10 years ago)
parent18ff3db
static-linux/Dockerfile+1
@@ -20,6 +20,7 @@ RUN stack install --stack-yaml stack.pkg.yaml --only-dependencies \
2020 --test --ghc-options '-O2 -optc-Os -optl-static -fPIC' \
2121 pandoc pandoc-citeproc
2222CMD git pull && \
23+ git checkout -b work $TREE && \
2324 export VERSION=`grep '^Version:' pandoc.cabal | awk '{print $$2;}'` && \
2425 stack install --stack-yaml stack.pkg.yaml \
2526 --local-bin-path /artifacts --flag 'pandoc:embed_data_files' \
static-linux/Makefile+3−2
@@ -1,11 +1,12 @@
1+TREE?=HEAD
12ARTIFACTS=`pwd`/artifacts
23
34build:
45 mkdir -p $(ARTIFACTS)
5− docker run -v $(ARTIFACTS):/artifacts alpine-pandoc
6+ docker build -t alpine-pandoc .
7+ docker run --env TREE=$(TREE) -v $(ARTIFACTS):/artifacts alpine-pandoc
68
79setup:
810 docker pull alpine:edge
9− docker build -t alpine-pandoc .
1011
1112.PHONY: build setup