File tree Expand file tree Collapse file tree 8 files changed +22
-10
lines changed Expand file tree Collapse file tree 8 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
33. .github/jobs/ci_settings.sh
44
@@ -13,7 +13,7 @@ export APP_ENV="${4:-prod}"
1313
1414MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:- root}
1515
16- set -eux
16+ set -euxo pipefail
1717
1818if [ -z " $phpversion " ]; then
1919phpversion=$( php -r ' echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION."\n";' )
Original file line number Diff line number Diff line change 33. .github/jobs/ci_settings.sh
44
55if [ -n " $1 " ] && [ " $1 " != " default" ]; then
6- export ARCH=" $1 "
6+ export ARCH_OPTION=" -a $1 "
7+ else
8+ export ARCH_OPTION=" "
79fi
810
911function finish() {
@@ -20,6 +22,8 @@ FAILED=0
2022
2123trap finish EXIT
2224
25+ set -euo pipefail
26+
2327DIR=$PWD
2428section_start " Debug info"
2529lsb_release -a | tee -a " $ARTIFACTS /debug-info"
@@ -44,7 +48,7 @@ cd /opt/domjudge/judgehost/bin || exit 1
4448section_end chroot
4549
4650section_start " Show minimal chroot"
47- ./dj_make_chroot -a " $ARCH " | tee -a " $ARTIFACTS " /chroot.log
51+ ./dj_make_chroot $ARCH_OPTION | tee -a " $ARTIFACTS " /chroot.log
4852section_end
4953
5054section_start " Test chroot contents"
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
3- set -eux
3+ set -euxo pipefail
44
55. .github/jobs/ci_settings.sh
66
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
3- set -eux
3+ set -euxo pipefail
44
55distro_id=$( grep " ^ID=" /etc/os-release)
66
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3+ # We can't convert this script to bash as GHA doesn't have bash installed
4+ #
5+ # The current script doesn't use a piped command so the "benefit" of using
6+ # pipefail is not there over the hassle of maintaining another container.
37set -eux
48
59echo " Set plugin config for version detection"
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
3- set -eux
3+ set -euxo pipefail
44
55# Ignore the CLICS API strict mode
66sudo sed -i " s/'strict'/'ignore-clics'/g" /opt/domjudge/domserver/webapp/src/Controller/API/AbstractRestController.php
Original file line number Diff line number Diff line change 22
33. .github/jobs/ci_settings.sh
44
5+ set -euo pipefail
6+
57DIR=" $PWD "
68
79export version=$1
Original file line number Diff line number Diff line change 22
33. .github/jobs/ci_settings.sh
44
5+ set -euo pipefail
6+
57DIR=" $PWD "
68
79if [ " $# " -ne " 2" ]; then
You can’t perform that action at this time.
0 commit comments