Skip to content

refactor: bring back updated install.sh with patches #9583

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

Merged
merged 5 commits into from
Sep 7, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
use local version of install.sh in e2e tests
  • Loading branch information
aslilac committed Sep 7, 2023
commit 259af3023a021bf571bd7c9c53ef856063c3fae2
38 changes: 15 additions & 23 deletions site/e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,45 +263,37 @@ export const downloadCoderVersion = async (
return binaryPath;
}

// Runs our public install script using our options to
// install the binary!
// Run our official install script to install the binary
await new Promise<void>((resolve, reject) => {
const cp = spawn(
"sh",
path.join(__dirname, "../../install.sh"),
[
"-c",
[
"curl",
"-L",
"https://coder.com/install.sh",
"|",
"sh",
"-s",
"--",
"--version",
version,
"--method",
"standalone",
"--prefix",
tempDir,
"--binary-name",
binaryName,
].join(" "),
"--version",
version,
"--method",
"standalone",
"--prefix",
tempDir,
"--binary-name",
binaryName,
],
{
env: {
...process.env,
XDG_CACHE_HOME: "/tmp/coder-e2e-cache",
TRACE: "1", // tells install.sh to `set -x`, helpful if something goes wrong
},
},
);
// eslint-disable-next-line no-console -- Needed for debugging
cp.stderr.on("data", (data) => console.log(data.toString()));
cp.stderr.on("data", (data) => console.error(data.toString()));
// eslint-disable-next-line no-console -- Needed for debugging
cp.stdout.on("data", (data) => console.log(data.toString()));
cp.on("close", (code) => {
if (code === 0) {
resolve();
} else {
reject(new Error("curl failed with code " + code));
reject(new Error("install.sh failed with code " + code));
}
});
});
Expand Down