mirror of
https://github.com/MillironX/setup-nextflow.git
synced 2024-11-21 17:36:04 +00:00
refactor!: Rename NextflowRelease.versionNumber to NextflowRelease.version
This is to preserve consistency with the new API
This commit is contained in:
parent
c5088a9942
commit
a6f42a71d4
3 changed files with 6 additions and 6 deletions
|
@ -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<string> {
|
||||
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(
|
||||
|
|
|
@ -46,9 +46,9 @@ async function run(): Promise<void> {
|
|||
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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue