Skip to content

Commit

Permalink
switched to checking for 0.4 releases of past 2 weeks
Browse files Browse the repository at this point in the history
  • Loading branch information
matthme committed May 13, 2024
1 parent c454f99 commit 5d7292e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/check-new-04-releases.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ const binariesTagsOptions = {

getAndDo(holochainReleasesOptions, (data) => {
const allReleases = JSON.parse(data);
// filter by releases that have been published in the last 10 hours
const recentReleases = allReleases.filter((release) => Date.now() - (new Date(release.published_at)).getTime() < 36000000);
// filter by releases that have been published in the last 2 weeks
const recentReleases = allReleases.filter((release) => Date.now() - (new Date(release.published_at)).getTime() < 1209600000);
getAndDo(binariesTagsOptions, (data) => {
const binaryTags = JSON.parse(data);
// Check for holochain 0.4 releases that have not yet a tag in the holochain-binaries repo
const binaryTagHcVersions = binaryTags.map((tag) => tag.name.replace('-binaries', ''));
const unbuiltReleases = recentReleases.map((release) => release.tag_name).filter((releaseName) => !binaryTagHcVersions.includes(releaseName));
const unbuilt03Releases = unbuiltReleases.filter((tagName) => tagName.startsWith('holochain-0.4'));
const unbuilt04Releases = unbuiltReleases.filter((tagName) => tagName.startsWith('holochain-0.4'));
// We assume that there is only one new release without tag
if (unbuilt03Releases.length > 0) {
console.log(unbuilt03Releases[0].replace('holochain-', ''));
if (unbuilt04Releases.length > 0) {
console.log(unbuilt04Releases[0].replace('holochain-', ''));
}

})
Expand Down

0 comments on commit 5d7292e

Please sign in to comment.