mirror of
https://github.com/MillironX/setup-nextflow.git
synced 2024-11-23 18:09:55 +00:00
refactor!: Rename NextflowRelease.versionNumber to NextflowRelease.version
This is to preserve consistency with the new API
This commit is contained in:
parent
f144ed4bc0
commit
a9c11a2b4e
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
|
// If we are sent a numbered tag, then back through the list until we find
|
||||||
// a release that fulfils the requested version number
|
// a release that fulfils the requested version number
|
||||||
for await (const release of releases) {
|
for await (const release of releases) {
|
||||||
if (semver.satisfies(release.versionNumber, version, true)) {
|
if (semver.satisfies(release.version, version, true)) {
|
||||||
return release
|
return release
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ export async function install_nextflow(
|
||||||
get_all: boolean
|
get_all: boolean
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const url = get_all ? release.allBinaryURL : release.binaryURL
|
const url = get_all ? release.allBinaryURL : release.binaryURL
|
||||||
const version = release.versionNumber
|
const version = release.version
|
||||||
|
|
||||||
core.debug(`Downloading Nextflow from ${url}`)
|
core.debug(`Downloading Nextflow from ${url}`)
|
||||||
const nf_dl_path = await retry(
|
const nf_dl_path = await retry(
|
||||||
|
|
|
@ -46,9 +46,9 @@ async function run(): Promise<void> {
|
||||||
const release_iterator = pull_releases(octokit)
|
const release_iterator = pull_releases(octokit)
|
||||||
release = await get_nextflow_release(version, release_iterator)
|
release = await get_nextflow_release(version, release_iterator)
|
||||||
}
|
}
|
||||||
resolved_version = release.versionNumber
|
resolved_version = release.version
|
||||||
core.info(
|
core.info(
|
||||||
`Input version '${version}' resolved to Nextflow ${release.versionNumber}`
|
`Input version '${version}' resolved to Nextflow ${release.version}`
|
||||||
)
|
)
|
||||||
} catch (e: unknown) {
|
} catch (e: unknown) {
|
||||||
if (e instanceof Error) {
|
if (e instanceof Error) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Houses the pertinent data that GitHub exposes for each Nextflow release
|
* Houses the pertinent data that GitHub exposes for each Nextflow release
|
||||||
*/
|
*/
|
||||||
export type NextflowRelease = {
|
export type NextflowRelease = {
|
||||||
versionNumber: string
|
version: string
|
||||||
isEdge: boolean
|
isEdge: boolean
|
||||||
binaryURL: string
|
binaryURL: string
|
||||||
allBinaryURL: string
|
allBinaryURL: string
|
||||||
|
@ -16,7 +16,7 @@ export type NextflowRelease = {
|
||||||
*/
|
*/
|
||||||
export function nextflow_release(data: object): NextflowRelease {
|
export function nextflow_release(data: object): NextflowRelease {
|
||||||
const nf_release: NextflowRelease = {
|
const nf_release: NextflowRelease = {
|
||||||
versionNumber: data["tag_name"],
|
version: data["tag_name"],
|
||||||
isEdge: data["prerelease"],
|
isEdge: data["prerelease"],
|
||||||
binaryURL: nextflow_bin_url(data, false),
|
binaryURL: nextflow_bin_url(data, false),
|
||||||
allBinaryURL: nextflow_bin_url(data, true)
|
allBinaryURL: nextflow_bin_url(data, true)
|
||||||
|
|
Loading…
Reference in a new issue