Skip to content

Commit d70ef54

Browse files
committed
Use set -e
1 parent d2449d4 commit d70ef54

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

ci/vulcan/build-for-ci.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# The working directory is expected to be the highest directory of the git repo (~/webring)
66

7+
set -e
8+
79
if [ $# -ne 1 ]; then
810
echo Expected one argument for the commit hash
911
exit 1
@@ -18,14 +20,14 @@ CI_PATH=/dev/shm/webring-ci
1820
# Create the directory if it's not already created
1921
if ! [ -d $CI_PATH ]; then
2022
# Prevent other users from deleting/modifying our directory
21-
mkdir $CI_PATH --mode=700 || exit 1
23+
mkdir $CI_PATH --mode=700
2224
fi
2325

2426
# Checkout the commit into the testing directory
2527
# Use `--work-tree` to copy the code into the testing directory instead of the deployment directory. This doesn't copy `.git`.
26-
git fetch --all || exit 1
27-
git --work-tree $CI_PATH checkout $HASH -- . || exit 1
28-
cd $CI_PATH || exit 1
28+
git fetch --all
29+
git --work-tree $CI_PATH checkout $HASH -- .
30+
cd $CI_PATH
2931

3032
# Build the flake
31-
nix build || exit 1
33+
nix build

ci/vulcan/cleanup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22

33
# Clean up the CI environment after having run `test.sh`.
44

5+
set -e
6+
57
cd /
68
rm -rf /dev/shm/webring-ci

ci/vulcan/deploy.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Deploy a commit as the new webring.
44

5+
set -e
6+
57
if [ $# -ne 1 ]; then
68
echo Expected one argument for the commit hash
79
exit 1
@@ -10,8 +12,8 @@ fi
1012
HASH=$1
1113

1214
# Fetch and checkout the commit
13-
git fetch --all || exit 1
14-
git checkout $HASH || exit 1
15+
git fetch --all
16+
git checkout $HASH
1517

1618
# Reload home manager — Automatically rebuilds the webring and restarts the systemd unit.
17-
home-manager switch || exit 1
19+
home-manager switch

0 commit comments

Comments
 (0)