Skip to content

Commit

Permalink
Merge pull request #336 from cdktf/chore/force-release-task
Browse files Browse the repository at this point in the history
chore: Create a force-release task
  • Loading branch information
mutahhir authored Aug 25, 2023
2 parents 686fe95 + 6cc02db commit 3a1d096
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/force-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class ForceRelease {
name: "Install dependencies",
run: "yarn install --check-files --frozen-lockfile",
},
{ name: "release", run: "npx projen release" },
{ name: "force-release", run: "npx projen force-release" },
{
name: "Backup artifact permissions",
run: "cd dist && getfacl -R . > permissions-backup.acl",
Expand Down
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,13 @@ export class CdktfProviderProject extends cdk.JsiiProject {
new ShouldReleaseScriptFile(this, {});

const releaseTask = this.tasks.tryFind("release")!;
// Keep the original release task to be used by the force-release workflow
this.addTask("force-release", {
description: "Force a release",
steps: releaseTask.steps,
env: (releaseTask as any)._env,
});

this.removeTask("release");
this.addTask("release", {
description: releaseTask.description,
Expand Down
90 changes: 84 additions & 6 deletions test/__snapshots__/index.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a1d096

Please sign in to comment.