mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-21 07:01:45 +00:00
Use console debug instead of log
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
This commit is contained in:
parent
479a5ebf04
commit
416e06d250
1 changed files with 11 additions and 11 deletions
22
index.js
22
index.js
|
|
@ -17,12 +17,12 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
||||||
const extract = os === "windows" ? "tar -xvf" : "tar -xvzf";
|
const extract = os === "windows" ? "tar -xvf" : "tar -xvzf";
|
||||||
const archive = `${tempdir}${pathsep}gotestfmt${postfix}`;
|
const archive = `${tempdir}${pathsep}gotestfmt${postfix}`;
|
||||||
|
|
||||||
console.log("postfix: " + postfix);
|
console.debug("postfix: " + postfix);
|
||||||
console.log("pathsep: " + pathsep);
|
console.debug("pathsep: " + pathsep);
|
||||||
console.log("tempdir: " + tempdir);
|
console.debug("tempdir: " + tempdir);
|
||||||
console.log("binpath: " + binpath);
|
console.debug("binpath: " + binpath);
|
||||||
console.log("extract: " + extract);
|
console.debug("extract: " + extract);
|
||||||
console.log("archive: " + archive);
|
console.debug("archive: " + archive);
|
||||||
|
|
||||||
for (let asset of releaseAssets.data) {
|
for (let asset of releaseAssets.data) {
|
||||||
|
|
||||||
|
|
@ -31,18 +31,18 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
||||||
|
|
||||||
console.log("Found binary named " + asset.name + " at " + asset.browser_download_url + " , attempting download...")
|
console.log("Found binary named " + asset.name + " at " + asset.browser_download_url + " , attempting download...")
|
||||||
if (token) {
|
if (token) {
|
||||||
console.log(`curl -L -o ${archive} -H "Authorization: Bearer ${token}" ${asset.browser_download_url}`)
|
console.debug(`curl -L -o ${archive} -H "Authorization: Bearer ${token}" ${asset.browser_download_url}`)
|
||||||
execSync(`curl -L -o ${archive} -H "Authorization: Bearer ${token}" ${asset.browser_download_url}`)
|
execSync(`curl -L -o ${archive} -H "Authorization: Bearer ${token}" ${asset.browser_download_url}`)
|
||||||
} else {
|
} else {
|
||||||
console.log(`curl -L -o ${archive} ${asset.browser_download_url}`)
|
console.debug(`curl -L -o ${archive} ${asset.browser_download_url}`)
|
||||||
execSync(`curl -L -o ${archive} ${asset.browser_download_url}`)
|
execSync(`curl -L -o ${archive} ${asset.browser_download_url}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Unpacking archive file...")
|
console.debug("Unpacking archive file...")
|
||||||
console.log(`cd ${binpath} && ${extract} ${archive}`)
|
console.debug(`cd ${binpath} && ${extract} ${archive}`)
|
||||||
execSync(`cd ${binpath} && ${extract} ${archive}`)
|
execSync(`cd ${binpath} && ${extract} ${archive}`)
|
||||||
|
|
||||||
console.log("Removing asset archive...")
|
console.debug("Removing asset archive...")
|
||||||
fs.unlinkSync(archive)
|
fs.unlinkSync(archive)
|
||||||
|
|
||||||
console.log("Successfully set up gotestfmt.")
|
console.log("Successfully set up gotestfmt.")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue