@codedrifters/configulator 0.0.108 → 0.0.109
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 +8 -8
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +8 -8
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -364,8 +364,8 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
|
|
|
364
364
|
}
|
|
365
365
|
activateBranchNameEnvVar() {
|
|
366
366
|
this.addGlobalEnvVar(
|
|
367
|
-
"
|
|
368
|
-
"${
|
|
367
|
+
"GIT_BRANCH_NAME",
|
|
368
|
+
"${GIT_BRANCH_NAME:-$(git rev-parse --abbrev-ref HEAD)}"
|
|
369
369
|
);
|
|
370
370
|
}
|
|
371
371
|
preSynthesize() {
|
|
@@ -424,7 +424,7 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
|
|
|
424
424
|
_TurboRepo.buildWorkflowOptions = (remoteCacheOptions) => {
|
|
425
425
|
return {
|
|
426
426
|
env: {
|
|
427
|
-
|
|
427
|
+
GIT_BRANCH_NAME: "${{ github.head_ref || github.ref_name }}"
|
|
428
428
|
},
|
|
429
429
|
permissions: {
|
|
430
430
|
contents: import_workflows_model.JobPermission.WRITE,
|
|
@@ -467,7 +467,7 @@ var AwsDeploymentConfig = class _AwsDeploymentConfig extends import_projen.Compo
|
|
|
467
467
|
this.project.tasks.tryFind("synth:silent")?.reset(`rm -rf ${this.cdkOut}`);
|
|
468
468
|
this.project.tasks.tryFind("synth:silent")?.exec(`cdk synth -q --output ${this.cdkOut}`, { env: this.env });
|
|
469
469
|
};
|
|
470
|
-
this.env = {
|
|
470
|
+
this.env = { GIT_BRANCH_NAME: "$(git branch --show-current)" };
|
|
471
471
|
this.projectPath = (0, import_node_path.relative)(project.root.outdir, project.outdir);
|
|
472
472
|
this.rootPath = (0, import_node_path.relative)(project.outdir, project.root.outdir);
|
|
473
473
|
this.rootCdkOut = (0, import_node_path.join)("dist", this.projectPath, "cdk.out");
|
|
@@ -1334,11 +1334,11 @@ var MonorepoProject = class extends import_typescript.TypeScriptAppProject {
|
|
|
1334
1334
|
packageManager: import_javascript2.NodePackageManager.PNPM,
|
|
1335
1335
|
/**
|
|
1336
1336
|
* Some additional pre-build steps if we're using turbo's remote cache.
|
|
1337
|
-
* Set
|
|
1337
|
+
* Set GIT_BRANCH_NAME so Turborepo remote cache hashes match between local and CI.
|
|
1338
1338
|
*/
|
|
1339
1339
|
buildWorkflowOptions: {
|
|
1340
1340
|
env: {
|
|
1341
|
-
|
|
1341
|
+
GIT_BRANCH_NAME: "${{ github.head_ref || github.ref_name }}",
|
|
1342
1342
|
...buildWorkflowOptions?.env,
|
|
1343
1343
|
...userOptions.buildWorkflowOptions?.env
|
|
1344
1344
|
},
|
|
@@ -1647,10 +1647,10 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen9.Componen
|
|
|
1647
1647
|
*/
|
|
1648
1648
|
...options.buildWorkflowOptions,
|
|
1649
1649
|
/**
|
|
1650
|
-
* Set
|
|
1650
|
+
* Set GIT_BRANCH_NAME so Turborepo remote cache hashes match between local and CI.
|
|
1651
1651
|
*/
|
|
1652
1652
|
env: {
|
|
1653
|
-
|
|
1653
|
+
GIT_BRANCH_NAME: "${{ github.head_ref || github.ref_name }}",
|
|
1654
1654
|
...options.buildWorkflowOptions?.env,
|
|
1655
1655
|
...buildWorkflowOptions?.env
|
|
1656
1656
|
},
|