Skip to content

Commit

Permalink
change regex for latest patch to match whole jsons parts of download …
Browse files Browse the repository at this point in the history
…page per version
  • Loading branch information
psavidis committed Oct 11, 2024
1 parent 06829e9 commit 2fb6d67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163858,10 +163858,10 @@ module.exports = async function () {
}

const getMinorFromPotentialLabel = function (potentialLabel) {
const regex = /potential:(\d+\.\d+)\.\d+/; // TODO we can adapt the regepx to only match up to minor version (ignoring patch version)
const regex = /(potential:)(\d+\.\d+)/;
const match = potentialLabel.match(regex);

return match ? match[1] : null;
return match ? match[2] : null;
}

const getNextPatchVersion = function (currentVersion) {
Expand Down
4 changes: 2 additions & 2 deletions common/src/set-version-labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ module.exports = async function () {
}

const getMinorFromPotentialLabel = function (potentialLabel) {
const regex = /potential:(\d+\.\d+)\.\d+/; // TODO we can adapt the regepx to only match up to minor version (ignoring patch version)
const regex = /(potential:)(\d+\.\d+)/;
const match = potentialLabel.match(regex);

return match ? match[1] : null;
return match ? match[2] : null;
}

const getNextPatchVersion = function (currentVersion) {
Expand Down

0 comments on commit 2fb6d67

Please sign in to comment.