File tree Expand file tree Collapse file tree 3 files changed +34
-57
lines changed Expand file tree Collapse file tree 3 files changed +34
-57
lines changed Original file line number Diff line number Diff line change @@ -49,55 +49,25 @@ jobs:
49
49
- name : Wait for CDN refreshment
50
50
run : sleep 1m
51
51
52
- test-ubuntu- install :
52
+ test-install :
53
53
needs : wait-for-cdn
54
+ strategy :
55
+ matrix :
56
+ image :
57
+ - ubuntu:20.04
58
+ - ubuntu:22.04
59
+ - centos:7
60
+ - amazonlinux:2
54
61
container :
55
- image : ubuntu:20.04
62
+ image : ${{ matrix.image }}
56
63
runs-on : ubuntu-latest
57
64
steps :
58
- - name : Install curl
59
- run : |
60
- apt-get update
61
- apt-get install curl -y
62
-
63
- - name : Test swiftbox install and upgrade
64
- run : |
65
- sh -c "$(curl -fsSL https://raw.githubusercontent.com/stevapple/swiftbox/master/install.sh)"
66
- swiftbox -v
67
- swiftbox upgrade
68
-
69
- - name : Test swiftbox setup
70
- env :
71
- DEBIAN_FRONTEND : noninteractive
72
- DEBCONF_NONINTERACTIVE_SEEN : true
73
- run : swiftbox list
74
-
75
- test-centos-install :
76
- needs : wait-for-cdn
77
- container :
78
- image : centos:7
79
- runs-on : ubuntu-latest
80
- steps :
81
- - name : Test swiftbox install and upgrade
65
+ - name : Install cURL
66
+ if : ${{ startsWith(matrix.image, 'ubuntu:') }}
67
+ run : apt-get update && apt-get install curl -y
68
+ - name : Test swiftbox install
82
69
run : |
83
70
sh -c "$(curl -fsSL https://raw.githubusercontent.com/stevapple/swiftbox/master/install.sh)"
84
71
swiftbox -v
85
- swiftbox upgrade
86
-
87
- - name : Test swiftbox setup
88
- run : swiftbox list
89
-
90
- test-amzn-install :
91
- needs : wait-for-cdn
92
- container :
93
- image : amazonlinux:2
94
- runs-on : ubuntu-latest
95
- steps :
96
- - name : Test swiftbox install and upgrade
97
- run : |
98
- sh -c "$(curl -fsSL https://raw.githubusercontent.com/stevapple/swiftbox/master/install.sh)"
99
- swiftbox -v
100
- swiftbox upgrade
101
-
102
- - name : Test swiftbox setup
103
- run : swiftbox list
72
+ - name : Test swiftbox upgrade
73
+ run : swiftbox upgrade
Original file line number Diff line number Diff line change 7
7
8
8
if [ -f /etc/os-release ]
9
9
then
10
- ID =` cat /etc/os-release | grep ' ^ID=' | sed ' s/ID=//g' | sed ' s/"//g' `
11
- case $ID in
10
+ OS =` cat /etc/os-release | grep ' ^ID=' | sed ' s/ID=//g' | sed ' s/"//g' `
11
+ case $OS in
12
12
ubuntu)
13
13
if hash curl 2> /dev/null || ! hash jq 2> /dev/null
14
14
then
17
17
fi
18
18
;;
19
19
rhel | centos | amzn)
20
+ VERSION=` cat /etc/os-release | grep ' ^VERSION_ID=' | sed ' s/VERSION_ID=//g' | sed ' s/"//g' `
20
21
if ! hash curl 2> /dev/null || ! hash jq 2> /dev/null || ! hash which 2> /dev/null
21
22
then
22
- $SUDO_FLAG yum install curl jq which -q -y
23
+ if [ $OS != ' amzn' ] && [ $VERSION -lt 8 ]
24
+ then
25
+ $SUDO_FLAG yum install epel-release -y & > /dev/null
26
+ fi
27
+ $SUDO_FLAG yum install curl jq which -y & > /dev/null
23
28
fi
24
29
;;
25
30
* )
Original file line number Diff line number Diff line change 2
2
3
3
# # Set environment properties
4
4
5
- SWIFTBOX_VERSION=" 0.13.3 "
5
+ SWIFTBOX_VERSION=" 0.13.4 "
6
6
SWIFT_DOWNLOAD_SITE=" https://download.swift.org"
7
7
8
8
if [ ` id -u` = 0 ]
48
48
SYSTEM_NAME=" centos"
49
49
if ! hash curl 2> /dev/null || ! hash wget 2> /dev/null || ! hash jq 2> /dev/null
50
50
then
51
- $SUDO_FLAG yum install curl wget jq -q -y
51
+ if [ $SYSTEM_VERSION -lt 8 ]
52
+ then
53
+ $SUDO_FLAG yum install epel-release -y & > /dev/null
54
+ fi
55
+ $SUDO_FLAG yum install curl wget jq -y & > /dev/null
52
56
fi
53
57
;;
54
58
amzn)
55
59
SYSTEM_NAME=" amazonlinux"
56
60
if ! hash curl 2> /dev/null || ! hash wget 2> /dev/null || ! hash jq 2> /dev/null
57
61
then
58
- $SUDO_FLAG yum install curl wget jq -y > /dev/null
62
+ $SUDO_FLAG yum install curl wget jq -y & > /dev/null
59
63
fi
60
64
;;
61
65
* )
104
108
fi
105
109
done
106
110
107
- # # Download Base URL
108
-
109
- download-base () {
110
- echo $SWIFT_DOWNLOAD_SITE /$1 /$SYSTEM_NAME ${SYSTEM_VERSION// ./ } $ARCH_SUFFIX
111
- }
112
-
113
111
# # Configure the environment
114
112
115
113
init-env () {
@@ -230,6 +228,10 @@ reinit-env() {
230
228
231
229
# # Parse and check Swift version
232
230
231
+ download-base () {
232
+ echo $SWIFT_DOWNLOAD_SITE /$1 /$SYSTEM_NAME ${SYSTEM_VERSION// ./ } $ARCH_SUFFIX
233
+ }
234
+
233
235
format-version () {
234
236
if [ ! $1 ]
235
237
then
You can’t perform that action at this time.
0 commit comments