Skip to content

Commit

Permalink
use toml rust-toolchain
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Wrock <[email protected]>
  • Loading branch information
mwrock committed May 20, 2024
1 parent c7137d6 commit b44fd78
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .expeditor/scripts/post_habitat_release/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion components/builder-api/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion components/builder-graph/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion components/builder-jobsrv/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/builder-worker/habitat-dev/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion components/builder-worker/habitat/x86_64-linux/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion components/builder-worker/habitat/x86_64-windows/plan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
1.68.2
[toolchain]
channel = "1.68.2"
2 changes: 1 addition & 1 deletion support/ci/shared.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion support/ci/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit b44fd78

Please sign in to comment.