From 5922237b5886e9d5a9f452ec43014dedf4534a2b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 19 Mar 2017 10:24:25 +0100 Subject: static-linux: allow setting TREE to build from arbitrary git commit. --- static-linux/Dockerfile | 1 + static-linux/Makefile | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'static-linux') diff --git a/static-linux/Dockerfile b/static-linux/Dockerfile index 7c66f2029..cf44d9472 100644 --- a/static-linux/Dockerfile +++ b/static-linux/Dockerfile @@ -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' \ diff --git a/static-linux/Makefile b/static-linux/Makefile index d8dc8151d..8c359da7b 100644 --- a/static-linux/Makefile +++ b/static-linux/Makefile @@ -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 -- cgit v1.2.3