Skip to content

Commit

Permalink
add CI step to check for gx-rewritten paths
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Steven Allen <[email protected]>
  • Loading branch information
Stebalien committed Oct 22, 2018
1 parent 7a7bf2c commit 85cd479
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/test-gx-imports
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
T="$(mktemp)"
if go list -f '{{ join .Deps "\n" }}' ./... | grep '^gx/ipfs/' >"$T"; then
echo "Go-ipfs has the following gx-imports"
echo "-----------------------------------"
cat "$T"
echo "-----------------------------------"
echo "Run 'gx-go rw --fix' in your source directory"
rm -f "$T"
exit 1
fi
rm -f "$T"
7 changes: 7 additions & 0 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
run 'test -z "$(./bin/gx deps dupes)"'
}
}
},
'check for gx paths': {
setupStep('linux') { run ->
timeout(time: check_timeout, unit: 'MINUTES') {
run 'make test_gx_imports'
}
}
}
)
}
Expand Down
3 changes: 3 additions & 0 deletions mk/gx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ gx-deps: bin/gx bin/gx-go
endif
.PHONY: gx-deps

test_gx_imports:
bin/test-gx-imports

ifeq ($(tarball-is),0)
DEPS_GO += gx-deps
endif

0 comments on commit 85cd479

Please sign in to comment.