Skip to content

Commit 7b58c52

Browse files
committed
Prefer raw.githubusercontent.com
1 parent 0183251 commit 7b58c52

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

.github/workflows/CI.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
115115
- name: Test swiftbox install and update
116116
run: |
117-
sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/stevapple/swiftbox@`./swiftbox.sh version`/install.sh)"
117+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/stevapple/swiftbox/master/install.sh)"
118118
swiftbox version
119119
swiftbox update
120120
@@ -136,10 +136,10 @@ jobs:
136136
./swiftbox.sh version
137137
138138
- name: Wait for CDN refreshment
139-
run: sleep 1m
139+
run: sleep 30s
140140

141141
- name: Test swiftbox install and update
142142
run: |
143-
sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/stevapple/swiftbox@`./swiftbox.sh version`/install.sh)"
143+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/stevapple/swiftbox/master/install.sh)"
144144
swiftbox version
145145
swiftbox update

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ There will be two sets of Swift environments if you use both. The local one is i
1212

1313
```bash
1414
# With curl (Recommended)
15-
sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/stevapple/swiftbox/install.sh)"
15+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/stevapple/swiftbox/master/install.sh)"
1616
swiftbox version
1717

1818
# With git
@@ -26,12 +26,12 @@ Or if you'd like to use it as a script (do not support `update` yet):
2626

2727
```bash
2828
# With wget
29-
wget https://cdn.jsdelivr.net/gh/stevapple/swiftbox/swiftbox.sh
29+
wget https://raw.githubusercontent.com/stevapple/swiftbox/master/swiftbox.sh
3030
chmod +x swiftbox.sh
3131
./swiftbox.sh version
3232

3333
# With curl
34-
curl -o swiftbox.sh https://cdn.jsdelivr.net/gh/stevapple/swiftbox/swiftbox.sh
34+
curl -o swiftbox.sh https://raw.githubusercontent.com/stevapple/swiftbox/master/swiftbox.sh
3535
chmod +x swiftbox.sh
3636
./swiftbox.sh version
3737

@@ -42,10 +42,31 @@ chmod +x swiftbox.sh
4242
./swiftbox.sh version
4343
```
4444

45+
You can designate a release version by using jsDelivr or git, which also has wider availability:
46+
47+
```bash
48+
# With wget
49+
wget https://cdn.jsdelivr.net/gh/stevapple/[email protected]/swiftbox.sh
50+
chmod +x swiftbox.sh
51+
./swiftbox.sh version
52+
53+
# With curl
54+
curl -o swiftbox.sh https://cdn.jsdelivr.net/gh/stevapple/[email protected]/swiftbox.sh
55+
chmod +x swiftbox.sh
56+
./swiftbox.sh version
57+
58+
# With git
59+
git clone https://github.com/stevapple/swiftbox
60+
cd swiftbox
61+
git checkout v0.6.1
62+
chmod +x swiftbox.sh
63+
./swiftbox.sh version
64+
```
65+
4566
You can later install it to `/usr/bin`:
4667

4768
```shell
48-
$ ./swiftbox.sh install
69+
$ sudo ./swiftbox.sh install
4970
Successfully installed swiftbox to system.
5071
$ which swiftbox
5172
/usr/bin/swiftbox
@@ -57,7 +78,7 @@ $ which swiftbox
5778

5879
```shell
5980
$ swiftbox version
60-
0.4.2
81+
0.6.1
6182
```
6283

6384
### Check the availability of Swift versions

0 commit comments

Comments
 (0)