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 @@ -86,13 +86,17 @@ matrix:
86
86
os : osx
87
87
rust : nightly
88
88
89
+ before_install : set -e
90
+
89
91
install :
90
92
- sh ci/install.sh
91
93
- source ~/.cargo/env || true
92
94
93
95
script :
94
96
- bash ci/script.sh
95
97
98
+ after_script : set +e
99
+
96
100
before_deploy :
97
101
- sh ci/before_deploy.sh
98
102
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