Skip to content

Commit

Permalink
fix: Modify deployment error message (#896)
Browse files Browse the repository at this point in the history
* fix: Modify deployment error message

* fix

* fix error message
  • Loading branch information
wangyantong2000 authored Oct 22, 2024
1 parent 05a8cca commit 10ff222
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ const deployToChrome = async () => {
const zipFile = fs.createReadStream(ZIP_PATH);

const token = await chromeStore.fetchToken();

const uploadRes = await chromeStore.uploadExisting(zipFile, token);
console.log({ uploadRes });
console.log('chrome uploadRes: ', JSON.stringify(uploadRes, null, 2));

if (uploadRes.uploadState !== 'FAILURE') {
const publishRes = await chromeStore.publish('default', token);
console.log({ publishRes });
console.log('chrome publishRes: ', JSON.stringify(publishRes, null, 2));
} else {
process.exit(-1);
}
};

Expand All @@ -47,13 +48,16 @@ const deployToEdge = async () => {
clientSecret: EDGE_CLIENT_SECRET,
accessTokenUrl: EDGE_ACCESS_TOKEN_URL,
});

const publishResp = await edgeStore.submit({
filePath: ZIP_PATH,
notes: 'Updating extension.',
});

console.log('publishResp: ', publishResp);
try {
const publishResp = await edgeStore.submit({
filePath: ZIP_PATH,
notes: 'Updating extension.',
});
console.log('edge publishResp:', publishResp);
} catch (error) {
console.error('edge deployment failed:', error.message);
process.exit(-1);
}
};

(async () => {
Expand Down

0 comments on commit 10ff222

Please sign in to comment.