Skip to content

Commit 9a8c514

Browse files
committed
Synchronize CI with upstream trust configuration
1 parent e9e6225 commit 9a8c514

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,17 @@ matrix:
8686
os: osx
8787
rust: nightly
8888

89+
before_install: set -e
90+
8991
install:
9092
- sh ci/install.sh
9193
- source ~/.cargo/env || true
9294

9395
script:
9496
- bash ci/script.sh
9597

98+
after_script: set +e
99+
96100
before_deploy:
97101
- sh ci/before_deploy.sh
98102

ci/install.sh

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
set -ex
22

33
main() {
4-
curl https://sh.rustup.rs -sSf | \
5-
sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
6-
74
local target=
85
if [ $TRAVIS_OS_NAME = linux ]; then
9-
target=x86_64-unknown-linux-gnu
6+
target=x86_64-unknown-linux-musl
7+
sort=sort
108
else
119
target=x86_64-apple-darwin
10+
sort=gsort # for `sort --sort-version`, from brew's coreutils.
1211
fi
1312

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)
1619
curl -LSfs https://japaric.github.io/trust/install.sh | \
1720
sh -s -- \
1821
--force \
1922
--git japaric/cross \
20-
--tag v0.1.4 \
23+
--tag $tag \
2124
--target $target
2225
}
2326

0 commit comments

Comments
 (0)