Merge pull request #504 from coreos-inc/fix-build

Make GIT_HEAD work on quay
This commit is contained in:
Silas Sewell 2015-09-16 18:26:48 -04:00
commit 4b03abbe9f
2 changed files with 2 additions and 5 deletions

View file

@ -5,7 +5,6 @@ test/data/registry
venv
.git
!.git/HEAD
!.git/refs
.gitignore
Bobfile
README.md

View file

@ -54,10 +54,8 @@ RUN mkdir static/fonts static/ldn
RUN venv/bin/python -m external_libraries
RUN mkdir /usr/local/nginx/logs/
# We exclude everything except .git/{HEAD,refs} in .dockerignore so we don't
# leak data into the image layer.
RUN cat ".git/$( cat .git/HEAD | cut -d' ' -f 2 )" > GIT_HEAD
RUN rm -fr .git
# TODO(ssewell): only works on a detached head, make work with ref
RUN cat .git/HEAD > GIT_HEAD
# Run the tests
RUN TEST=true venv/bin/python -m unittest discover -f