forked from NHSDigital/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·49 lines (32 loc) · 890 Bytes
/
setup.sh
File metadata and controls
executable file
·49 lines (32 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
# WARNING: Please DO NOT edit this file! It is maintained in the Repository Template (https://github.com/NHSDigital/nhs-notify-repository-template). Raise a PR instead.
set -euo pipefail
# Pre-Install dependencies and run make config on Github Runner.
#
# Usage:
# $ ./setup.sh
# ==============================================================================
function main() {
cd "$(git rev-parse --show-toplevel)"
run-setup
return 0
}
function run-setup() {
sudo apt install bundler -y
time make config
check-setup-status
return 0
}
# Check the exit status of tfsec.
function check-setup-status() {
if [[ $? -eq 0 ]]; then
echo "Setup completed successfully."
else
echo "Setup was unsuccessful."
exit 1
fi
return 0
}
# ==============================================================================
main "$@"
exit 0