Skip to content

Commit

Permalink
Verify equals solution
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKinas committed Sep 2, 2024
1 parent c86f60d commit 633f42b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/gh/update/latest-version-of.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ module.exports = async ({ exec, github, dependencyName, tag }) => {
}
};
await exec.exec(`npm dist-tag ls @alfresco/${dependencyName}`, [], options);
// const tagsType = packageDistTag.split('\n');
// console.log(`tagsType: ${tagsType}`);
// tagsType.forEach((tagType) => {
// tagSplit = tagType.split(':');
// if (tagSplit[0].includes(tag)) {
// matchedPkgVersion = tagSplit[1].trim();
// }
// });
const tagsType = packageDistTag.split('\n');
console.log(`tagsType: ${tagsType}`);
const matchedPkgVersion = tagsType.find((tagType) => tagType.includes(tag))?.split(':')[1].trim();
const matchedPkgVersion = tagsType.find((tagType) => tagType === tag)?.split(':')[1].trim();
console.log(`matchedPkgVersion: ${matchedPkgVersion}`);
const latestPkgToUpdate = availablePackages.find((package) => package.name === matchedPkgVersion);
console.log(`latestPkgToUpdate: ${latestPkgToUpdate}`);
Expand Down

0 comments on commit 633f42b

Please sign in to comment.