diff --git a/.expeditor/scripts/post_habitat_release/shared.sh b/.expeditor/scripts/post_habitat_release/shared.sh index 486b751be..6f0dc7f8c 100755 --- a/.expeditor/scripts/post_habitat_release/shared.sh +++ b/.expeditor/scripts/post_habitat_release/shared.sh @@ -44,7 +44,7 @@ install_rustup() { } get_toolchain() { - cat "$(git rev-parse --show-toplevel)/rust-toolchain" + tail -n 1 "$(git rev-parse --show-toplevel)/rust-toolchain" | cut -d'"' -f 2 } latest_release_tag() { diff --git a/Makefile b/Makefile index 5c2ec80be..e694ff936 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ unit-$1: linux ## executes the $1 component's unit test suite endef $(foreach component,$(ALL),$(eval $(call UNIT,$(component)))) -TOOLCHAIN := $(shell cat rust-toolchain) +TOOLCHAIN := $(shell tail -n 1 rust-toolchain | cut -d'"' -f 2) lint: $(run) test/run_clippy.sh $(TOOLCHAIN) test/unexamined_lints.txt \ test/allowed_lints.txt \ diff --git a/components/builder-api/habitat/plan.sh b/components/builder-api/habitat/plan.sh index 33d712ff6..a08ef46a8 100644 --- a/components/builder-api/habitat/plan.sh +++ b/components/builder-api/habitat/plan.sh @@ -7,7 +7,7 @@ pkg_bin_dirs=(bin) pkg_deps=(core/glibc core/openssl core/coreutils core/gcc-libs core/zeromq core/libarchive core/curl core/postgresql) pkg_build_deps=(core/protobuf-cpp core/protobuf-rust core/coreutils core/cacerts -core/rust/"$(cat "../../../rust-toolchain")" core/gcc core/git core/pkg-config core/cmake) +core/rust/"$(tail -n 1 "../../../rust-toolchain" | cut -d'"' -f 2)" core/gcc core/git core/pkg-config core/cmake) pkg_exports=( [port]=http.port ) diff --git a/components/builder-graph/habitat/plan.sh b/components/builder-graph/habitat/plan.sh index 0959ad76d..34a79220c 100644 --- a/components/builder-graph/habitat/plan.sh +++ b/components/builder-graph/habitat/plan.sh @@ -18,7 +18,7 @@ pkg_deps=( pkg_build_deps=( core/protobuf-cpp #TODO: This can probably be removed if we removed the crate dep on builder-protocol core/protobuf-rust #TODO: This can probably be removed if we removed the crate dep on builder-protocol - core/rust/"$(cat "../../../rust-toolchain")" + core/rust/"$(tail -n 1 "../../../rust-toolchain" | cut -d'"' -f 2)" core/pkg-config core/git ) diff --git a/components/builder-jobsrv/habitat/plan.sh b/components/builder-jobsrv/habitat/plan.sh index b611b737c..ef5bedd12 100644 --- a/components/builder-jobsrv/habitat/plan.sh +++ b/components/builder-jobsrv/habitat/plan.sh @@ -7,7 +7,7 @@ pkg_bin_dirs=(bin) pkg_deps=(core/glibc core/openssl core/gcc-libs core/zeromq core/libarchive core/postgresql) pkg_build_deps=(core/protobuf-cpp core/protobuf-rust core/coreutils core/cacerts - core/rust/"$(cat "../../../rust-toolchain")" core/gcc core/git core/pkg-config) + core/rust/"$(tail -n 1 "../../../rust-toolchain" | cut -d'"' -f 2)" core/gcc core/git core/pkg-config) pkg_exports=( [worker_port]=net.worker_command_port [worker_heartbeat]=net.worker_heartbeat_port diff --git a/components/builder-worker/habitat-dev/plan.sh b/components/builder-worker/habitat-dev/plan.sh index 5676bb3da..ce084743a 100644 --- a/components/builder-worker/habitat-dev/plan.sh +++ b/components/builder-worker/habitat-dev/plan.sh @@ -7,7 +7,7 @@ pkg_deps=(core/glibc core/openssl core/gcc-libs core/zeromq core/libarchive core/zlib core/hab core/hab-studio core/hab-pkg-export-container core/docker core/curl) pkg_build_deps=(core/make core/cmake core/protobuf-cpp core/protobuf-rust core/coreutils core/cacerts - core/rust/"$(cat "../../../rust-toolchain")" core/gcc core/git core/pkg-config) + core/rust/"$(tail -n 1 "../../../rust-toolchain" | cut -d'"' -f 2)" core/gcc core/git core/pkg-config) pkg_binds=( [jobsrv]="worker_port worker_heartbeat log_port" diff --git a/components/builder-worker/habitat/x86_64-linux-kernel2/plan.sh b/components/builder-worker/habitat/x86_64-linux-kernel2/plan.sh index e9397ca04..4d4de0d7f 100644 --- a/components/builder-worker/habitat/x86_64-linux-kernel2/plan.sh +++ b/components/builder-worker/habitat/x86_64-linux-kernel2/plan.sh @@ -8,7 +8,7 @@ pkg_bin_dirs=(bin) pkg_deps=(core/glibc core/openssl core/gcc-libs core/zeromq core/libarchive core/zlib core/hab core/hab-studio core/curl) pkg_build_deps=(core/make core/cmake core/protobuf-cpp core/protobuf-rust core/coreutils core/cacerts - core/rust/"$(cat "../../../../rust-toolchain")" core/gcc core/git core/pkg-config) + core/rust/"$(tail -n 1 "../../../../rust-toolchain" | cut -d'"' -f 2)" core/gcc core/git core/pkg-config) pkg_binds=( [jobsrv]="worker_port worker_heartbeat log_port" [depot]="url" diff --git a/components/builder-worker/habitat/x86_64-linux/plan.sh b/components/builder-worker/habitat/x86_64-linux/plan.sh index 6b1e28dff..fee582283 100644 --- a/components/builder-worker/habitat/x86_64-linux/plan.sh +++ b/components/builder-worker/habitat/x86_64-linux/plan.sh @@ -9,7 +9,7 @@ pkg_deps=(core/glibc core/openssl core/gcc-libs core/zeromq core/libarchive core/zlib core/hab core/hab-studio core/hab-pkg-export-container core/docker core/curl) pkg_build_deps=(core/make core/cmake core/protobuf-cpp core/protobuf-rust core/coreutils core/cacerts - core/rust/"$(cat "../../../../rust-toolchain")" core/gcc core/git core/pkg-config) + core/rust/"$(tail -n 1 "../../../../rust-toolchain" | cut -d'"' -f 2)" core/gcc core/git core/pkg-config) pkg_binds=( [jobsrv]="worker_port worker_heartbeat log_port" [depot]="url" diff --git a/components/builder-worker/habitat/x86_64-windows/plan.ps1 b/components/builder-worker/habitat/x86_64-windows/plan.ps1 index f92544827..741bf275a 100644 --- a/components/builder-worker/habitat/x86_64-windows/plan.ps1 +++ b/components/builder-worker/habitat/x86_64-windows/plan.ps1 @@ -17,7 +17,7 @@ $pkg_build_deps = @( "core/visual-cpp-build-tools-2015", "core/windows-10-sdk", "core/protobuf", - "core/rust/$(Get-Content "../../../../rust-toolchain")", + "core/rust/$((ConvertFrom-StringData (Get-Content "../../../../rust-toolchain")[1]).channel.Replace('"', ''))", "core/cacerts", "core/git", "core/perl" diff --git a/rust-toolchain b/rust-toolchain index 5deab586f..864d3c411 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1,2 @@ -1.68.2 +[toolchain] +channel = "1.68.2" diff --git a/support/ci/shared.ps1 b/support/ci/shared.ps1 index 8458c6ffe..798e0c3be 100644 --- a/support/ci/shared.ps1 +++ b/support/ci/shared.ps1 @@ -45,7 +45,7 @@ function Get-RustfmtToolchain { } function Get-Toolchain { - "$(Get-Content $PSScriptRoot\..\..\rust-toolchain)" + "$((ConvertFrom-StringData (Get-Content "$PLAN_CONTEXT/../../../rust-toolchain")[1]).channel.Replace('"', ''))" } function Install-RustToolchain($Toolchain) { diff --git a/support/ci/shared.sh b/support/ci/shared.sh index e71d5d5d1..dd050552d 100755 --- a/support/ci/shared.sh +++ b/support/ci/shared.sh @@ -20,7 +20,7 @@ get_rustfmt_toolchain() { } get_toolchain() { - cat "$dir/../../rust-toolchain" + tail -n 1 "$dir/../../rust-toolchain" | cut -d'"' -f 2 } install_rustup() {