Skip to content

Commit

Permalink
Merge pull request #122 from c-dilks/strict-build
Browse files Browse the repository at this point in the history
fix: build failures should always exit non-zero
  • Loading branch information
baltzell authored Sep 28, 2023
2 parents 04558ca + 3e02fb8 commit 0fd9f7b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bin/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ thisEnv=${BASH_SOURCE[0]:-$0}
export CLAS12DIR=$(realpath $(dirname $thisEnv)/..)

# Set default field maps (but do not override user's env):
if [ -z "$COAT_MAGFIELD_TORUSMAP" ]; then
if [ -z "${COAT_MAGFIELD_TORUSMAP-}" ]; then
export COAT_MAGFIELD_TORUSMAP=Symm_torus_r2501_phi16_z251_24Apr2018.dat
fi
if [ -z "$COAT_MAGFIELD_TORUSSECONDARYMAP" ]; then
if [ -z "${COAT_MAGFIELD_TORUSSECONDARYMAP-}" ]; then
export COAT_MAGFIELD_TORUSSECONDARYMAP=Full_torus_r251_phi181_z251_25Jan2021.dat
fi
if [ -z "$COAT_MAGFIELD_SOLENOIDMAP" ]; then
if [ -z "${COAT_MAGFIELD_SOLENOIDMAP-}" ]; then
export COAT_MAGFIELD_SOLENOIDMAP=Symm_solenoid_r601_phi1_z1201_13June2018.dat
fi

Expand Down
8 changes: 6 additions & 2 deletions build-coatjava.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

set -e
set -u
set -o pipefail

usage='build-coatjava.sh [-h] [--quiet] [--spotbugs] [--nomaps] [--unittests]'

quiet="no"
Expand All @@ -25,7 +29,7 @@ do
quiet="yes"
else
echo "$usage"
exit
exit 2
fi
done

Expand Down Expand Up @@ -77,7 +81,7 @@ if [ $downloadMaps == "yes" ]; then
echo ERROR::::::::::: Could not download field map:
echo $webDir/$map
echo One option is to download manually into etc/data/magfield and then run this build script with --nomaps
exit
exit 1
fi
done
cd -
Expand Down

0 comments on commit 0fd9f7b

Please sign in to comment.