summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2019-09-03 18:49:17 -0600
committermo khan <mo@mokhan.ca>2019-09-03 18:49:17 -0600
commita67ef9c7d53548cd5bea9196eb7e754f893990db (patch)
tree9f620b7f086d470591572848f4c8044881586005 /bin
parent221dba40184c3ba31efb3ed9fd467035886f9e5c (diff)
build pipeline
Diffstat (limited to 'bin')
-rwxr-xr-xbin/docker-test9
-rwxr-xr-xbin/setup3
-rwxr-xr-xbin/test2
3 files changed, 13 insertions, 1 deletions
diff --git a/bin/docker-test b/bin/docker-test
new file mode 100755
index 0000000..05cb5e7
--- /dev/null
+++ b/bin/docker-test
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+cd "$(dirname "$0")/.."
+
+IMAGE=$(basename $PWD):latest
+
+docker build . -t $IMAGE
+docker run $IMAGE bundle exec rake publish
diff --git a/bin/setup b/bin/setup
index b8ce74f..511ca99 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,5 +1,8 @@
#!/bin/sh
+set -e
+cd "$(dirname "$0")/.."
+
git submodule update --init --remote
bundle install --path vendor/bundle --jobs $(nproc)
yarn install
diff --git a/bin/test b/bin/test
index 439013a..7d2ab7f 100755
--- a/bin/test
+++ b/bin/test
@@ -2,7 +2,7 @@
set -e
-cd "$(basename $0)/.."
+cd "$(dirname "$0")/.."
./bin/setup
export PATH="./vendor/bats/bin:./bin:$PATH"