Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnlindsay committed Dec 13, 2023
1 parent 8fb340c commit cb76850
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/actions-scripts/validate-release-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,15 @@ async function validateBetaVersion( version, beta_inc = 0 ) {
let ref = `/refs/tags/${beta_version}`

try {
// var tag = await octokit.rest.git.getRef({
// owner: owner,
// ref: ref,
// repo: repo,
// });
// console.log("Tag exists [rest]: ", tag)

const { data: beta_tag } = await octokit.request(
`GET /repos/${owner}/${repo}/refs/tags/${beta_version}`,
`GET /repos/${owner}/${repo}/git/refs/tags/${beta_version}`,
gh_api_header
)
console.log("Tag exists [request]: ", beta_tag.name)
return validateBetaVersion( version, beta_inc++ );
} catch (error) {
if (error.status === 404) {
console.log(`Tag does not exist exist @ 'refs/tags/${beta_version}'`)
console.log(`Tag does not exist exist @ 'git/refs/tags/${beta_version}'`)
console.log(error)
process.exit(1);
return beta_version;
Expand Down

0 comments on commit cb76850

Please sign in to comment.