@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.js
CHANGED
|
@@ -363,7 +363,10 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
activateBranchNameEnvVar() {
|
|
366
|
-
this.addGlobalEnvVar(
|
|
366
|
+
this.addGlobalEnvVar(
|
|
367
|
+
"BRANCH_NAME",
|
|
368
|
+
"${BRANCH_NAME:-$(git rev-parse --abbrev-ref HEAD)}"
|
|
369
|
+
);
|
|
367
370
|
}
|
|
368
371
|
preSynthesize() {
|
|
369
372
|
let nextDependsOn = this.project.deps.all.filter((d) => d.version === "workspace:*").map((d) => [d.name, ROOT_TURBO_TASK_NAME].join("#"));
|
|
@@ -420,6 +423,9 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
|
|
|
420
423
|
};
|
|
421
424
|
_TurboRepo.buildWorkflowOptions = (remoteCacheOptions) => {
|
|
422
425
|
return {
|
|
426
|
+
env: {
|
|
427
|
+
BRANCH_NAME: "${{ github.head_ref || github.ref_name }}"
|
|
428
|
+
},
|
|
423
429
|
permissions: {
|
|
424
430
|
contents: import_workflows_model.JobPermission.WRITE,
|
|
425
431
|
idToken: import_workflows_model.JobPermission.WRITE
|
|
@@ -1324,8 +1330,14 @@ var MonorepoProject = class extends import_typescript.TypeScriptAppProject {
|
|
|
1324
1330
|
packageManager: import_javascript2.NodePackageManager.PNPM,
|
|
1325
1331
|
/**
|
|
1326
1332
|
* Some additional pre-build steps if we're using turbo's remote cache.
|
|
1333
|
+
* Set BRANCH_NAME so Turborepo remote cache hashes match between local and CI.
|
|
1327
1334
|
*/
|
|
1328
1335
|
buildWorkflowOptions: {
|
|
1336
|
+
env: {
|
|
1337
|
+
BRANCH_NAME: "${{ github.head_ref || github.ref_name }}",
|
|
1338
|
+
...buildWorkflowOptions?.env,
|
|
1339
|
+
...userOptions.buildWorkflowOptions?.env
|
|
1340
|
+
},
|
|
1329
1341
|
permissions: {
|
|
1330
1342
|
...buildWorkflowOptions?.permissions,
|
|
1331
1343
|
...userOptions.buildWorkflowOptions?.permissions
|
|
@@ -1630,6 +1642,14 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen9.Componen
|
|
|
1630
1642
|
* Do this pre-merge of permissions and build steps
|
|
1631
1643
|
*/
|
|
1632
1644
|
...options.buildWorkflowOptions,
|
|
1645
|
+
/**
|
|
1646
|
+
* Set BRANCH_NAME so Turborepo remote cache hashes match between local and CI.
|
|
1647
|
+
*/
|
|
1648
|
+
env: {
|
|
1649
|
+
BRANCH_NAME: "${{ github.head_ref || github.ref_name }}",
|
|
1650
|
+
...options.buildWorkflowOptions?.env,
|
|
1651
|
+
...buildWorkflowOptions?.env
|
|
1652
|
+
},
|
|
1633
1653
|
/**
|
|
1634
1654
|
* Some additional permissions may be required when turbo's involved.
|
|
1635
1655
|
*/
|