Skip to content

Commit 0332f83

Browse files
committed
Synchronize CI with upstream trust configuration
1 parent 41dbfae commit 0332f83

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,17 @@ matrix:
8585
os: osx
8686
rust: nightly
8787

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

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

97+
after_script: set +e
98+
9599
before_deploy:
96100
- sh ci/before_deploy.sh
97101

ci/install.sh

Lines changed: 10 additions & 7 deletions
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)