mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-25 09:01:45 +00:00
More testing
This commit is contained in:
parent
cd87a7e4b4
commit
9a42bf633e
1 changed files with 21 additions and 18 deletions
15
index.js
15
index.js
|
|
@ -63,9 +63,11 @@ async function downloadGofmt(octokit, version, versionPrefix, org, repo) {
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log("Failed to find a release matching the criteria.")
|
||||
throw "Failed to find a release matching the criteria."
|
||||
}
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
// versionPrefix is the prefix of the version gotestfmt-action supports.
|
||||
const versionPrefix = "v1."
|
||||
|
|
@ -76,11 +78,12 @@ try {
|
|||
const octokit = new Octokit({
|
||||
auth: token,
|
||||
})
|
||||
downloadGofmt(octokit, version, versionPrefix, org, repo).then(function () {
|
||||
console.log("Download successful.")
|
||||
}).catch(reason => function() {
|
||||
core.setFailed(reason);
|
||||
})
|
||||
await downloadGofmt(octokit, version, versionPrefix, org, repo)
|
||||
console.log("Setup complete.")
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
console.log("Setup failed.")
|
||||
core.setFailed(error);
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue