File tree 1 file changed +9
-17
lines changed
1 file changed +9
-17
lines changed Original file line number Diff line number Diff line change 3
3
set -ex
4
4
5
5
main () {
6
- local target =
6
+ local host =
7
7
if [ $TRAVIS_OS_NAME = linux ]; then
8
- target=x86_64-unknown-linux-musl
9
- sort=sort
8
+ host=x86_64-unknown-linux-musl
10
9
else
11
- target=x86_64-apple-darwin
12
- sort=gsort # for `sort --sort-version`, from brew's coreutils.
10
+ host=x86_64-apple-darwin
13
11
fi
14
12
15
13
# Builds for iOS are done on OSX, but require the specific target to be
@@ -32,18 +30,12 @@ main() {
32
30
;;
33
31
esac
34
32
35
- # This fetches latest stable release
36
- local tag=$( git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
37
- | cut -d/ -f3 \
38
- | grep -E ' ^v[0.1.0-9.]+$' \
39
- | $sort --version-sort \
40
- | tail -n1)
41
- curl -LSfs https://japaric.github.io/trust/install.sh | \
42
- sh -s -- \
43
- --force \
44
- --git japaric/cross \
45
- --tag $tag \
46
- --target $target
33
+ # Pin the Cross version to avoid breaking the CI
34
+ local cross_version=" v0.2.0"
35
+ wget -O cross.tar.gz https://github.com/rust-embedded/cross/releases/download/${cross_version} /cross-${cross_version} -${host} .tar.gz
36
+ tar -xzf cross.tar.gz
37
+ rm -f cross.tar.gz
38
+ mv ./cross $HOME /.cargo/bin
47
39
}
48
40
49
41
main
You can’t perform that action at this time.
0 commit comments