File tree 2 files changed +14
-7
lines changed 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -85,13 +85,17 @@ matrix:
85
85
os : osx
86
86
rust : nightly
87
87
88
+ before_install : set -e
89
+
88
90
install :
89
91
- sh ci/install.sh
90
92
- source ~/.cargo/env || true
91
93
92
94
script :
93
95
- bash ci/script.sh
94
96
97
+ after_script : set +e
98
+
95
99
before_deploy :
96
100
- sh ci/before_deploy.sh
97
101
Original file line number Diff line number Diff line change 1
1
set -ex
2
2
3
3
main () {
4
- curl https://sh.rustup.rs -sSf | \
5
- sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
6
-
7
4
local target=
8
5
if [ $TRAVIS_OS_NAME = linux ]; then
9
- target=x86_64-unknown-linux-gnu
6
+ target=x86_64-unknown-linux-musl
7
+ sort=sort
10
8
else
11
9
target=x86_64-apple-darwin
10
+ sort=gsort # for `sort --sort-version`, from brew's coreutils.
12
11
fi
13
12
14
- # TODO At some point you'll probably want to use a newer release of `cross`,
15
- # simply change the argument to `--tag`.
13
+ # This fetches latest stable release
14
+ local tag=$( git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
15
+ | cut -d/ -f3 \
16
+ | grep -E ' ^v[0.1.0-9.]+$' \
17
+ | $sort --version-sort \
18
+ | tail -n1)
16
19
curl -LSfs https://japaric.github.io/trust/install.sh | \
17
20
sh -s -- \
18
21
--force \
19
22
--git japaric/cross \
20
- --tag v0.1.4 \
23
+ --tag $tag \
21
24
--target $target
22
25
}
23
26
You can’t perform that action at this time.
0 commit comments