From 9e1210850fbdd8561af5a932560a422b24a43cf3 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Fri, 2 Feb 2024 11:22:07 -0600 Subject: [PATCH] refactor!: Rename NextflowRelease.versionNumber to NextflowRelease.version This is to preserve consistency with the new API --- src/functions.ts | 4 ++-- src/main.ts | 4 ++-- src/nextflow-release.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/functions.ts b/src/functions.ts index dcdca3c..45daca6 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -14,7 +14,7 @@ export async function get_nextflow_release( // If we are sent a numbered tag, then back through the list until we find // a release that fulfils the requested version number for await (const release of releases) { - if (semver.satisfies(release.versionNumber, version, true)) { + if (semver.satisfies(release.version, version, true)) { return release } } @@ -28,7 +28,7 @@ export async function install_nextflow( get_all: boolean ): Promise { const url = get_all ? release.allBinaryURL : release.binaryURL - const version = release.versionNumber + const version = release.version core.debug(`Downloading Nextflow from ${url}`) const nf_dl_path = await retry( diff --git a/src/main.ts b/src/main.ts index 93a53a4..e263d51 100644 --- a/src/main.ts +++ b/src/main.ts @@ -46,9 +46,9 @@ async function run(): Promise { const release_iterator = pull_releases(octokit) release = await get_nextflow_release(version, release_iterator) } - resolved_version = release.versionNumber + resolved_version = release.version core.info( - `Input version '${version}' resolved to Nextflow ${release.versionNumber}` + `Input version '${version}' resolved to Nextflow ${release.version}` ) } catch (e: unknown) { if (e instanceof Error) { diff --git a/src/nextflow-release.ts b/src/nextflow-release.ts index a3f1b1c..d287c1a 100644 --- a/src/nextflow-release.ts +++ b/src/nextflow-release.ts @@ -2,7 +2,7 @@ * Houses the pertinent data that GitHub exposes for each Nextflow release */ export type NextflowRelease = { - versionNumber: string + version: string isEdge: boolean binaryURL: string allBinaryURL: string @@ -16,7 +16,7 @@ export type NextflowRelease = { */ export function nextflow_release(data: object): NextflowRelease { const nf_release: NextflowRelease = { - versionNumber: data["tag_name"], + version: data["tag_name"], isEdge: data["prerelease"], binaryURL: nextflow_bin_url(data, false), allBinaryURL: nextflow_bin_url(data, true)