Skip to content

Commit

Permalink
v0.70
Browse files Browse the repository at this point in the history
  • Loading branch information
matsumonkie committed Jan 26, 2021
1 parent 0beeb8c commit b4182d3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
17 changes: 8 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function run() {
const success = await createTar(project, tarName);
if(success) {
console.log("sending archive");
sendTarToIzuna(project, tarName);
await sendTarToIzuna(project, tarName);
}
} catch (error) {
core.setFailed(error.message);
Expand Down Expand Up @@ -84,14 +84,13 @@ async function sendTarToIzuna(project, tarName) {

const form = new FormData();
form.append(tarName, fs.createReadStream(tarName));
await axios
.post(izunaBuilderUrl, form)
.then((response) => {
if(response.status !== 200) {
console.error("Could not upload project information to izuna server");
throw "Could not upload project information to izuna server";
}
});
const response = await axios.post(izunaBuilderUrl, form)
if(response.status !== 200) {
core.setFailed('Could not upload project information to izuna server');
return false;
} else {
return true;
}
}

run();
Expand Down
17 changes: 8 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function run() {
const success = await createTar(project, tarName);
if(success) {
console.log("sending archive");
sendTarToIzuna(project, tarName);
await sendTarToIzuna(project, tarName);
}
} catch (error) {
core.setFailed(error.message);
Expand Down Expand Up @@ -73,14 +73,13 @@ async function sendTarToIzuna(project, tarName) {

const form = new FormData();
form.append(tarName, fs.createReadStream(tarName));
await axios
.post(izunaBuilderUrl, form)
.then((response) => {
if(response.status !== 200) {
console.error("Could not upload project information to izuna server");
throw "Could not upload project information to izuna server";
}
});
const response = await axios.post(izunaBuilderUrl, form)
if(response.status !== 200) {
core.setFailed('Could not upload project information to izuna server');
return false;
} else {
return true;
}
}

run();
Binary file modified node_modules/@vercel/ncc/dist/ncc/cli.js.cache
Binary file not shown.
Binary file modified node_modules/@vercel/ncc/dist/ncc/index.js.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit b4182d3

Please sign in to comment.