File tree Expand file tree Collapse file tree
taskcluster/scripts/build Expand file tree Collapse file tree Original file line number Diff line number Diff line change 132132sudo mk-build-deps --tool ' apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends' \
133133 --install --remove $MK_BUILD_DEPS_ARGS " $( pwd) /mozillavpn-source/debian/control"
134134
135+ # /usr/bin/cargo and /usr/bin/rustc may be installed as cargo-<version> and rustc-<version>
136+ # Find the latest versions of these binaries as installed by the build dependencies and link them to /usr/bin.
137+
138+ if ! command -v cargo > /dev/null 2>&1 ; then
139+ CARGO_BIN=$( find /usr/bin -maxdepth 1 -type f -name ' cargo-*' | sort -V | tail -n1)
140+ RUSTC_BIN=$( find /usr/bin -maxdepth 1 -type f -name ' rustc-*' | sort -V | tail -n1)
141+
142+ [ -n " $CARGO_BIN " ] && sudo ln -sf " $CARGO_BIN " /usr/bin/cargo
143+ [ -n " $RUSTC_BIN " ] && sudo ln -sf " $RUSTC_BIN " /usr/bin/rustc
144+ else
145+
135146(cd mozillavpn-source/ && dpkg-buildpackage $DPKG_PACKAGE_BUILD_ARGS )
136147
137148# Compress all build artifacts into a tarball
You can’t perform that action at this time.
0 commit comments