Add logging statements

This commit is contained in:
Thomas A. Christensen II 2022-06-13 13:40:20 -05:00
parent ec7d98ca18
commit 8d8703ed87
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -90,6 +90,9 @@ async function run() {
try { try {
const version = core.getInput("version"); const version = core.getInput("version");
release = release_data(version, octokit); release = release_data(version, octokit);
core.info(
`Input version '${version}' resolved to Nextflow ${release.name}`
);
} catch (e) { } catch (e) {
core.setFailed( core.setFailed(
`Could not retrieve Nextflow release matching ${version}.\n${e.message}` `Could not retrieve Nextflow release matching ${version}.\n${e.message}`
@ -101,6 +104,7 @@ async function run() {
try { try {
const get_all = core.getBooleanInput("all"); const get_all = core.getBooleanInput("all");
url = nextflow_bin_url(release, get_all); url = nextflow_bin_url(release, get_all);
core.info(`Preparing to download from ${url}`);
} catch (e) { } catch (e) {
core.setFailed(`Could not parse the download URL\n${e.message}`); core.setFailed(`Could not parse the download URL\n${e.message}`);
} }
@ -121,6 +125,7 @@ async function run() {
); );
core.addPath(nf_path); core.addPath(nf_path);
core.info(`Downloaded \`nextflow\` to ${nf_path} and added to PATH`);
} catch (e) { } catch (e) {
core.setFailed(e.message); core.setFailed(e.message);
} }