From 06afa786efc6530773b70b3a169c1bbf611b1c9d Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Tue, 24 Oct 2017 22:38:51 -0500 Subject: [PATCH 1/3] Trigger CI failure if bindata contains any dev links --- script/test_all.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/script/test_all.sh b/script/test_all.sh index 478978a..2087761 100755 --- a/script/test_all.sh +++ b/script/test_all.sh @@ -15,6 +15,15 @@ export PGPASSWORD="" export PGDATABASE="booktown" export PGPORT="15432" +if grep -q 'go/src/github.com/sosedoff/pgweb' ./pkg/data/bindata.go +then + echo "==========================================================" + echo "ERROR: Bindata contains development references to assets!" + echo "Fix with 'make assets' and commit the change." + echo "==========================================================" + exit 1 +fi + for i in {1..6} do export PGVERSION="9.$i" From c4cdacc2d80a7270aa16f932dea37104553c377c Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Tue, 24 Oct 2017 23:11:02 -0500 Subject: [PATCH 2/3] Add asset check script --- .travis.yml | 3 +++ script/check_assets.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100755 script/check_assets.sh diff --git a/.travis.yml b/.travis.yml index 35e05ae..ebba98e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,9 @@ go: env: - GO15VENDOREXPERIMENT=1 +before_install: + - ./script/check_assets.sh + install: - make setup diff --git a/script/check_assets.sh b/script/check_assets.sh new file mode 100755 index 0000000..fee44c7 --- /dev/null +++ b/script/check_assets.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if grep -q 'go/src/github.com/sosedoff/pgweb' ./pkg/data/bindata.go +then + echo "==========================================================" + echo "ERROR: Bindata contains development references to assets!" + echo "Fix with 'make assets' and commit the change." + echo "==========================================================" + exit 1 +fi \ No newline at end of file From 2dcaf4a3a1267212b64696b5b8c2bf403dbc4674 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Tue, 24 Oct 2017 23:13:22 -0500 Subject: [PATCH 3/3] Remove bindata check from test-all script --- script/test_all.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/script/test_all.sh b/script/test_all.sh index 2087761..478978a 100755 --- a/script/test_all.sh +++ b/script/test_all.sh @@ -15,15 +15,6 @@ export PGPASSWORD="" export PGDATABASE="booktown" export PGPORT="15432" -if grep -q 'go/src/github.com/sosedoff/pgweb' ./pkg/data/bindata.go -then - echo "==========================================================" - echo "ERROR: Bindata contains development references to assets!" - echo "Fix with 'make assets' and commit the change." - echo "==========================================================" - exit 1 -fi - for i in {1..6} do export PGVERSION="9.$i"