mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
First round of changes from Coder Agents review
This commit is contained in:
@@ -109,40 +109,36 @@
|
||||
vendorHash = "sha256-4Cb15MhKyhRvYVKfMqBwuC3WBBIJE6AinJt02+TSMVY=";
|
||||
};
|
||||
|
||||
# Keep Terraform aligned with provisioner/terraform/testdata/version.txt
|
||||
# so `make gen` remains deterministic across platforms.
|
||||
# Pin to provisioner/terraform/testdata/version.txt for deterministic
|
||||
# `make gen` across platforms.
|
||||
terraform_1_15_5 =
|
||||
let
|
||||
terraformPlatform =
|
||||
if pkgs.stdenv.isLinux && pkgs.stdenv.hostPlatform.isx86_64 then
|
||||
{
|
||||
platform = "linux_amd64";
|
||||
hash = "sha256-cCshNq9nKMj/A3+EPdLbzit62IeGtzgdHXKu+iUPYBw=";
|
||||
}
|
||||
else if pkgs.stdenv.isLinux && pkgs.stdenv.hostPlatform.isAarch64 then
|
||||
{
|
||||
platform = "linux_arm64";
|
||||
hash = "sha256-Bue0jegmFGxtkzG6NbE9oSMy2Dkr4w0d1reJukcT//A=";
|
||||
}
|
||||
else if pkgs.stdenv.isDarwin && pkgs.stdenv.hostPlatform.isAarch64 then
|
||||
{
|
||||
platform = "darwin_arm64";
|
||||
hash = "sha256-ARN2YFEABbkYu6ghVIZvvqxDkxY9gnfCq+hh37WELDw=";
|
||||
}
|
||||
else if pkgs.stdenv.isDarwin && pkgs.stdenv.hostPlatform.isx86_64 then
|
||||
{
|
||||
platform = "darwin_amd64";
|
||||
hash = "sha256-NofQfANLPn3u1bByzYris0g1vLE5uuw/xPX9U02r9e0=";
|
||||
}
|
||||
else
|
||||
null;
|
||||
hashes = {
|
||||
x86_64-linux = {
|
||||
platform = "linux_amd64";
|
||||
hash = "sha256-cCshNq9nKMj/A3+EPdLbzit62IeGtzgdHXKu+iUPYBw=";
|
||||
};
|
||||
aarch64-linux = {
|
||||
platform = "linux_arm64";
|
||||
hash = "sha256-Bue0jegmFGxtkzG6NbE9oSMy2Dkr4w0d1reJukcT//A=";
|
||||
};
|
||||
aarch64-darwin = {
|
||||
platform = "darwin_arm64";
|
||||
hash = "sha256-ARN2YFEABbkYu6ghVIZvvqxDkxY9gnfCq+hh37WELDw=";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
platform = "darwin_amd64";
|
||||
hash = "sha256-NofQfANLPn3u1bByzYris0g1vLE5uuw/xPX9U02r9e0=";
|
||||
};
|
||||
};
|
||||
target = hashes.${system} or null;
|
||||
in
|
||||
if terraformPlatform != null then
|
||||
if target != null then
|
||||
pkgs.runCommand "terraform-1.15.5" {
|
||||
nativeBuildInputs = [ pkgs.unzip ];
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://releases.hashicorp.com/terraform/1.15.5/terraform_1.15.5_${terraformPlatform.platform}.zip";
|
||||
hash = terraformPlatform.hash;
|
||||
url = "https://releases.hashicorp.com/terraform/1.15.5/terraform_1.15.5_${target.platform}.zip";
|
||||
hash = target.hash;
|
||||
};
|
||||
} ''
|
||||
mkdir -p "$out/bin"
|
||||
|
||||
+6
-3
@@ -140,10 +140,13 @@ if [[ " $* " == *" --check "* ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# The committed testdata encodes linux/amd64 values from the coder_provisioner
|
||||
# data source. Regenerating on a non-Linux host would bake in darwin/arm64 (or
|
||||
# similar) and dirty the tree. Guard here so local runs on macOS are safe.
|
||||
# Committed testdata encodes linux/amd64 values from coder_provisioner.
|
||||
# Regenerating elsewhere bakes in the host OS/arch.
|
||||
if [[ "$(uname)" != "Linux" ]]; then
|
||||
if ((upgrade)); then
|
||||
echo "ERROR: --upgrade is not supported on $(uname); run on Linux or via CI."
|
||||
exit 1
|
||||
fi
|
||||
echo "Note: skipping testdata regeneration on $(uname); regenerate on Linux or via CI."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -87,8 +87,7 @@ main() {
|
||||
[support]="Support"
|
||||
[tailnet]="Networking"
|
||||
)
|
||||
# shfmt (>=3.13) parses [install.sh] as floating-point arithmetic in array
|
||||
# literals, so this entry is assigned after the declaration instead.
|
||||
# shfmt (>=3.13) parses [install.sh] as floating-point arithmetic in array literals.
|
||||
humanized_areas["install.sh"]="Installer"
|
||||
|
||||
# Get hashes for all cherry-picked commits between the selected ref
|
||||
|
||||
Reference in New Issue
Block a user