Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use toml rust-toolchain #1803

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 "$PSScriptRoot/../../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
Loading