File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 4
4
#
5
5
# The working directory is expected to be the highest directory of the git repo (~/webring)
6
6
7
+ set -e
8
+
7
9
if [ $# -ne 1 ]; then
8
10
echo Expected one argument for the commit hash
9
11
exit 1
@@ -18,14 +20,14 @@ CI_PATH=/dev/shm/webring-ci
18
20
# Create the directory if it's not already created
19
21
if ! [ -d $CI_PATH ]; then
20
22
# Prevent other users from deleting/modifying our directory
21
- mkdir $CI_PATH --mode=700 || exit 1
23
+ mkdir $CI_PATH --mode=700
22
24
fi
23
25
24
26
# Checkout the commit into the testing directory
25
27
# 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
29
31
30
32
# Build the flake
31
- nix build || exit 1
33
+ nix build
Original file line number Diff line number Diff line change 2
2
3
3
# Clean up the CI environment after having run `test.sh`.
4
4
5
+ set -e
6
+
5
7
cd /
6
8
rm -rf /dev/shm/webring-ci
Original file line number Diff line number Diff line change 2
2
3
3
# Deploy a commit as the new webring.
4
4
5
+ set -e
6
+
5
7
if [ $# -ne 1 ]; then
6
8
echo Expected one argument for the commit hash
7
9
exit 1
10
12
HASH=$1
11
13
12
14
# 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
15
17
16
18
# Reload home manager — Automatically rebuilds the webring and restarts the systemd unit.
17
- home-manager switch || exit 1
19
+ home-manager switch
You can’t perform that action at this time.
0 commit comments