diff --git a/.travis.yml b/.travis.yml index 2b4f4188..412b735c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,6 @@ before_install: script: - make - docker run --rm -t -v "$(pwd):/app" -w /app/ui/app elm-env elm-format --validate src/ -- docker run --rm -t -v "$(pwd):/app" -w /app/ui/app elm-env elm-make --yes src/Main.elm --output /dev/null +- docker run --rm -t -v "$(pwd):/app" -w /app/ui/app elm-env elm-make --yes src/Main.elm --output script.js +- docker run --rm -t -v "$(pwd):/usr/src/app" -w /usr/src/app golang make assets +- git diff --exit-code diff --git a/Makefile b/Makefile index c1031a9a..f62c5f60 100644 --- a/Makefile +++ b/Makefile @@ -58,9 +58,10 @@ docker: assets: @echo ">> writing assets" -@$(GO) get -u github.com/jteeuwen/go-bindata/... -# Using "-modtime 1" to make assets target deterministic. It sets all file time stamps to unix timestamp 1 - @go-bindata $(bindata_flags) -modtime 1 -pkg ui -o ui/bindata.go ui/app/index.html ui/app/script.js - @go-bindata $(bindata_flags) -modtime 1 -pkg deftmpl -o template/internal/deftmpl/bindata.go template/default.tmpl +# Using "-mode 420" and "-modtime 1" to make assets make target deterministic. +# It sets all file permissions and time stamps to 420 and 1 + @go-bindata $(bindata_flags) -mode 420 -modtime 1 -pkg ui -o ui/bindata.go ui/app/index.html ui/app/script.js + @go-bindata $(bindata_flags) -mode 420 -modtime 1 -pkg deftmpl -o template/internal/deftmpl/bindata.go template/default.tmpl promu: @GOOS=$(shell uname -s | tr A-Z a-z) \ diff --git a/ui/Dockerfile b/ui/Dockerfile index 034943ff..314a0b04 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -1,11 +1,3 @@ FROM node:latest -ENV ELM_FORMAT_VERSION 0.6.0-alpha -ENV ELM_VERSION 0.18 - -RUN npm install -g elm@0.18.0 - -RUN wget https://github.com/avh4/elm-format/releases/download/${ELM_FORMAT_VERSION}/elm-format-${ELM_VERSION}-${ELM_FORMAT_VERSION}-linux-x64.tgz -O "elm-format" && \ - tar -xvzf elm-format && \ - mv elm-format /usr/local/bin/elm-format && \ - chmod +x /usr/local/bin/elm-format \ No newline at end of file +RUN npm install -g elm elm-format \ No newline at end of file