Signed-off-by: Jessica Frazelle <acidburn@docker.com>
| ... | ... |
@@ -116,4 +116,4 @@ test-unit: build |
| 116 | 116 |
$(DOCKER_RUN_DOCKER) hack/make.sh test-unit |
| 117 | 117 |
|
| 118 | 118 |
validate: build |
| 119 |
- $(DOCKER_RUN_DOCKER) hack/make.sh validate-dco validate-gofmt validate-pkg validate-lint validate-test validate-toml validate-vet validate-vendor |
|
| 119 |
+ $(DOCKER_RUN_DOCKER) hack/make.sh validate-dco validate-default-seccomp validate-gofmt validate-pkg validate-lint validate-test validate-toml validate-vet validate-vendor |
| 62 | 63 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,27 @@ |
| 0 |
+#!/bin/bash |
|
| 1 |
+ |
|
| 2 |
+source "${MAKEDIR}/.validate"
|
|
| 3 |
+ |
|
| 4 |
+IFS=$'\n' |
|
| 5 |
+files=( $(validate_diff --diff-filter=ACMR --name-only -- 'profiles/seccomp' || true) ) |
|
| 6 |
+unset IFS |
|
| 7 |
+ |
|
| 8 |
+if [ ${#files[@]} -gt 0 ]; then
|
|
| 9 |
+ # We run vendor.sh to and see if we have a diff afterwards |
|
| 10 |
+ go generate ./profiles/seccomp/ >/dev/null |
|
| 11 |
+ # Let see if the working directory is clean |
|
| 12 |
+ diffs="$(git status --porcelain -- profiles/seccomp 2>/dev/null)" |
|
| 13 |
+ if [ "$diffs" ]; then |
|
| 14 |
+ {
|
|
| 15 |
+ echo 'The result of go generate ./profiles/seccomp/ differs' |
|
| 16 |
+ echo |
|
| 17 |
+ echo "$diffs" |
|
| 18 |
+ echo |
|
| 19 |
+ echo 'Please re-run go generate ./profiles/seccomp/' |
|
| 20 |
+ echo |
|
| 21 |
+ } >&2 |
|
| 22 |
+ false |
|
| 23 |
+ else |
|
| 24 |
+ echo 'Congratulations! Seccomp profile generation is done correctly.' |
|
| 25 |
+ fi |
|
| 26 |
+fi |