Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
audunsolemdal committed Nov 29, 2023
1 parent 17abe90 commit e3c7445
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/generate-release-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ jobs:
}
}
}`;
const query2 = `query($owner: String!, $repo: String!, $first: Int!) {
repository(owner: $owner, name: $repo) {
refs(first: $first, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {
edges { node { name } }
}
}
}`;
let refPrefix = `refs/tags/${process.env.PACKAGE_NAME}/`;
if (process.env.PACKAGE_NAME == 'main')
Expand All @@ -135,19 +128,10 @@ jobs:
}
console.log('Querying for previous version', refPrefix);
let result;
if (process.env.PACKAGE_NAME == 'main')
{
result = await github.graphql(query2, { owner, repo,
first: 1,
});
}
else {
result = await github.graphql(query, { owner, repo,
const result = await github.graphql(query, { owner, repo,
refPrefix: refPrefix,
first: 1,
});
}
console.log(result);
Expand Down

0 comments on commit e3c7445

Please sign in to comment.