Skip to content

Commit

Permalink
chore: fixed release script
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach committed May 3, 2024
1 parent c28a5dd commit db392f8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .changeset/dull-worms-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@humanitec/backstage-plugin': patch
'@humanitec/backstage-plugin-backend': patch
'@humanitec/backstage-plugin-common': patch
---

re-release with fixed release script
10 changes: 5 additions & 5 deletions scripts/create-github-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ if (!BOOL_CREATE_RELEASE) {
}

const GH_OWNER = 'backstage';
const GH_REPO = 'backstage';
const GH_REPO = 'humanitec-backstage-plugins';
const EXPECTED_COMMIT_MESSAGE = /^Merge pull request #(?<prNumber>[0-9]+) from/;
const CHANGESET_RELEASE_BRANCH = 'backstage/changeset-release/master';
const CHANGESET_RELEASE_BRANCH = 'humanitec-backstage-plugins/changeset-release/main';

// Initialize a GitHub client
const octokit = new Octokit({
Expand Down Expand Up @@ -95,7 +95,7 @@ async function getCommitUsingTagName(tagName) {
}
const commitSha = tagData.data.object.sha;
console.log(
`The commit for the tag is https://github.com/backstage/backstage/commit/${commitSha}`,
`The commit for the tag is https://github.com/humanitec/humanitec-backstage-plugins/commit/${commitSha}`,
);

// Get the commit message using the commit SHA
Expand All @@ -113,7 +113,7 @@ async function getCommitUsingTagName(tagName) {
}

// Example Commit Message
// Merge pull request #3555 from backstage/changeset-release/master Version Packages
// Merge pull request #3555 from humanitec-backstage-plugins/changeset-release/main Version Packages
return { sha: commitSha, message: commitData.data.message };
}

Expand Down Expand Up @@ -145,7 +145,7 @@ async function getReleaseDescriptionFromCommit(commit) {
// Get the PR description from the commit message
const prNumber = commit.message.match(expectedMessage).groups.prNumber;
console.log(
`Identified the changeset Pull request - https://github.com/backstage/backstage/pull/${prNumber}`,
`Identified the changeset Pull request - https://github.com/humanitec/humanitec-backstage-plugins/pull/${prNumber}`,
);

const { data } = await octokit.pulls.get({
Expand Down
4 changes: 2 additions & 2 deletions scripts/create-release-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const fs = require('fs-extra');
const { EOL } = require('os');

const baseOptions = {
owner: 'backstage',
repo: 'backstage',
owner: 'humanitec',
repo: 'humanitec-backstage-plugins',
};

async function getCurrentReleaseTag() {
Expand Down

0 comments on commit db392f8

Please sign in to comment.