Skip to content

Commit

Permalink
scripts: fix snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
sylingd committed Jul 10, 2024
1 parent f7d9fd5 commit 1be3456
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/get-snapshot-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ async function main() {
// Get latest release version
const gitHubToken = process.env.GITHUB_TOKEN;
const gitHubBaseURL = process.env.GITHUB_API_URL + '/repos/' + process.env.GITHUB_REPOSITORY;
const latestReleaseResp = await axios.get(gitHubBaseURL + '/releases/latest', {
const latestRelease = await axios.get(gitHubBaseURL + '/releases/latest', {
headers: {
'Accept': 'application/vnd.github+json',
'Authorization': 'Bearer ' + gitHubToken,
'X-GitHub-Api-Version': '2022-11-28',
}
});
const latestRelease = await latestReleaseResp.json();
const versionPrefix = latestRelease.tag_name.replace(/^v/, '');
const versionPrefix = latestRelease.data.tag_name.replace(/^v/, '');

// Get remote version
const params = new URLSearchParams();
Expand Down

0 comments on commit 1be3456

Please sign in to comment.