File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ install:
25
25
$(PYTHON ) -m pip install $(CODE_DIR )
26
26
27
27
venv :
28
+ ifeq ($(ENFORCE_CLEAN_GIT ) ,true)
29
+ # Ensure git 'trusts' the directory inside docker
30
+ git config --global --add safe.directory $(CODE_DIR)
31
+ $(CODE_DIR)/bin/ensure-clean-working-directory.sh
32
+
33
+ endif
28
34
$(PYTHON) -m venv venv
29
35
30
36
tests : venv
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ readonly ROOT_DIR=" $( cd " $( dirname -- " $0 " ) /.." > /dev/null; pwd -P) "
5
+
6
+ CHANGED_FILES=$( git -C " $ROOT_DIR " status --untracked-files=no --porcelain | wc -l)
7
+
8
+ if [[ " $CHANGED_FILES " -eq 0 ]]; then
9
+ echo " Clean working directory"
10
+ else
11
+ echo " Changes detected" > /dev/stderr
12
+ git status --untracked-files=no > /dev/stderr
13
+ exit 1
14
+ fi
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ services:
3
3
image : quay.io/pypa/manylinux2014_x86_64
4
4
environment :
5
5
PYTHON :
6
+ ENFORCE_CLEAN_GIT : " true"
6
7
volumes :
7
8
# Sharing the entire volume causes the created venv to be broken on the host
8
9
@@ -32,6 +33,7 @@ services:
32
33
# These are included in the source distribution
33
34
- " ./LICENSE.txt:/code/LICENSE.txt"
34
35
- " ./README.md:/code/README.md"
36
+ - " ./SECURITY.md:/code/SECURITY.md"
35
37
- " ./py.typed:/code/py.typed"
36
38
37
39
# The build artifacts are stored in these locations
You can’t perform that action at this time.
0 commit comments