Skip to content

Commit c843b68

Browse files
fix version string generated in docker builds (#2566)
Dockerhub changes the executable bit on `hooks/build`, which leads to the repository being dirty during the build which messes with the version string created by setuptools-scm. This commit changes the executable bit so that the docker build does not make the repo dirty. It also adds a `git reset --hard` to ensure the repo is clean even if the build process dirties the repo in a different way in the future.
1 parent 654b21d commit c843b68

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ ADD . /code
2828

2929
WORKDIR /code
3030

31+
# force repository to be clean so the version string is right
32+
RUN git reset --hard
33+
3134
# Using "test" optional to include test dependencies in built docker-image
3235
RUN pip install .[test] && \
3336
apt-get purge -y --auto-remove apt-utils gcc libc6-dev libc-dev libssl-dev

hooks/build

100644100755
File mode changed.

0 commit comments

Comments
 (0)