From 0cb2772d3a29b94e6a8d79dc19a414e62f0abd9e Mon Sep 17 00:00:00 2001 From: DanVanAtta Date: Wed, 5 Jun 2024 22:29:44 -0700 Subject: [PATCH] Add a 'verify.sh' script to be the 'run-build' command Ideally running a build is just a gradle command, but to even make that easy, we have 'verify.sh' --- .github/workflows/master.yml | 2 +- README.md | 2 +- verify.sh | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 verify.sh diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 7ab26db..f99e486 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -22,7 +22,7 @@ jobs: # We skip 'spotlessApply' such that only 'spotlessCheck' will run to validate formatting. # This is a good setup for a CI server, meanwhile if a developer runs 'verify', they # will have the 'spotlessApply' task run to automatically format the code. - run: ./verify --exclude-task spotlessApply + run: ./verify.sh --exclude-task spotlessApply # - name: Load SSH private key into ssh-agent # uses: webfactory/ssh-agent@v0.9.0 diff --git a/README.md b/README.md index 83f4406..15d6da7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ triplea.github.access.token=CHANGE_ME ## Building ``` -./gradlew check +./verify.sh ``` ## Running diff --git a/verify.sh b/verify.sh new file mode 100755 index 0000000..15712c7 --- /dev/null +++ b/verify.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +scriptDir="$(dirname "$0")" +set -o pipefail +set -eu + +"$scriptDir/gradlew" spotlessApply check $@