Skip to content

Commit

Permalink
chore: pass turbo remote cache options in environment variables (#6479)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Sep 16, 2024
1 parent 3416632 commit a593a09
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions scripts/turbo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@ const { spawnProcess } = require("../utils/spawn-process");
const path = require("path");

const runTurbo = async (task, args, apiSecret, apiEndpoint) => {
let command = ["turbo", "run", task];
if (apiSecret && apiEndpoint) {
command = command.concat([
`--api=${apiEndpoint}`,
"--team=aws-sdk-js",
`--token=${apiSecret}`,
"--concurrency=100%",
]);
}
let command = ["turbo", "run", task, "--concurrency=100%"];
command = command.concat(args);
const turboRoot = path.join(__dirname, "..", "..");
try {
Expand All @@ -21,6 +13,12 @@ const runTurbo = async (task, args, apiSecret, apiEndpoint) => {
env: {
...process.env,
TURBO_TELEMETRY_DISABLED: "1",
...(apiSecret &&
apiEndpoint && {
TURBO_API: apiEndpoint,
TURBO_TOKEN: apiSecret,
TURBO_TEAM: "aws-sdk-js",
}),
},
});
} catch (error) {
Expand Down

0 comments on commit a593a09

Please sign in to comment.