Skip to content

Commit

Permalink
chore: pass turbo API and TOKEN in environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Sep 16, 2024
1 parent 71131f2 commit fa4d858
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 fa4d858

Please sign in to comment.