@codedrifters/configulator 0.0.96 → 0.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +21 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +21 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -337,7 +337,10 @@ var _TurboRepo = class _TurboRepo extends Component2 {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
activateBranchNameEnvVar() {
|
|
340
|
-
this.addGlobalEnvVar(
|
|
340
|
+
this.addGlobalEnvVar(
|
|
341
|
+
"BRANCH_NAME",
|
|
342
|
+
"${BRANCH_NAME:-$(git rev-parse --abbrev-ref HEAD)}"
|
|
343
|
+
);
|
|
341
344
|
}
|
|
342
345
|
preSynthesize() {
|
|
343
346
|
let nextDependsOn = this.project.deps.all.filter((d) => d.version === "workspace:*").map((d) => [d.name, ROOT_TURBO_TASK_NAME].join("#"));
|
|
@@ -394,6 +397,9 @@ var _TurboRepo = class _TurboRepo extends Component2 {
|
|
|
394
397
|
};
|
|
395
398
|
_TurboRepo.buildWorkflowOptions = (remoteCacheOptions) => {
|
|
396
399
|
return {
|
|
400
|
+
env: {
|
|
401
|
+
BRANCH_NAME: "${{ github.head_ref || github.ref_name }}"
|
|
402
|
+
},
|
|
397
403
|
permissions: {
|
|
398
404
|
contents: JobPermission.WRITE,
|
|
399
405
|
idToken: JobPermission.WRITE
|
|
@@ -1308,8 +1314,14 @@ var MonorepoProject = class extends TypeScriptAppProject {
|
|
|
1308
1314
|
packageManager: NodePackageManager2.PNPM,
|
|
1309
1315
|
/**
|
|
1310
1316
|
* Some additional pre-build steps if we're using turbo's remote cache.
|
|
1317
|
+
* Set BRANCH_NAME so Turborepo remote cache hashes match between local and CI.
|
|
1311
1318
|
*/
|
|
1312
1319
|
buildWorkflowOptions: {
|
|
1320
|
+
env: {
|
|
1321
|
+
BRANCH_NAME: "${{ github.head_ref || github.ref_name }}",
|
|
1322
|
+
...buildWorkflowOptions?.env,
|
|
1323
|
+
...userOptions.buildWorkflowOptions?.env
|
|
1324
|
+
},
|
|
1313
1325
|
permissions: {
|
|
1314
1326
|
...buildWorkflowOptions?.permissions,
|
|
1315
1327
|
...userOptions.buildWorkflowOptions?.permissions
|
|
@@ -1614,6 +1626,14 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component10 {
|
|
|
1614
1626
|
* Do this pre-merge of permissions and build steps
|
|
1615
1627
|
*/
|
|
1616
1628
|
...options.buildWorkflowOptions,
|
|
1629
|
+
/**
|
|
1630
|
+
* Set BRANCH_NAME so Turborepo remote cache hashes match between local and CI.
|
|
1631
|
+
*/
|
|
1632
|
+
env: {
|
|
1633
|
+
BRANCH_NAME: "${{ github.head_ref || github.ref_name }}",
|
|
1634
|
+
...options.buildWorkflowOptions?.env,
|
|
1635
|
+
...buildWorkflowOptions?.env
|
|
1636
|
+
},
|
|
1617
1637
|
/**
|
|
1618
1638
|
* Some additional permissions may be required when turbo's involved.
|
|
1619
1639
|
*/
|