Skip to content

Commit 684fa94

Browse files
committed
Adding more debug to the s3 uploads
1 parent 992aa9b commit 684fa94

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.evergreen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ variables:
2424
export APPLE_DEV_USER="${apple_dev_user}"
2525
export APPLE_DEV_PASSWORD="${apple_dev_password}"
2626
export APPLE_APP_IDENTITY="${apple_app_identity}"
27-
export DEBUG="node-codesign"
27+
export DEBUG="node-codesign,electron-notarize"
2828
export IS_CI="${is_ci}"
2929
npm run release
3030
RELEASE_MONGOSH

packages/build/src/github.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const releaseToGithub = async(version: string, artifact: string, platform: strin
2626
if (semver.gt(version, latestRelease.tag_name.replace('v', ''))) {
2727
// Create a new release if our version is higher than latest.
2828
const newRelease = await createRelease(version, octokit);
29+
// TODO: Durran - Sign and notarize for MacOS here instead of before.
2930
await uploadAsset(artifact, platform, newRelease.upload_url, octokit);
3031
return true;
3132
} else {
@@ -76,7 +77,7 @@ const createRelease = async(version: string, octokit: Octokit): Promise<any> =>
7677
* @param {string} uploadUrl - The release endpoint.
7778
* @param {Octokit} octokit - The octokit instance.
7879
*/
79-
const uploadAsset = (artifact: string, platform: string, uploadUrl: string, octokit: Octokit): Promise<any> => {
80+
const uploadAsset = async(artifact: string, platform: string, uploadUrl: string, octokit: Octokit) Promise<any> => {
8081
const params = {
8182
method: 'POST',
8283
url: uploadUrl,
@@ -87,7 +88,7 @@ const uploadAsset = (artifact: string, platform: string, uploadUrl: string, octo
8788
data: fs.readFileSync(artifact)
8889
};
8990
console.log('mongosh: uploading asset to github:', artifact);
90-
return octokit.request(params).catch((e) => {
91+
await octokit.request(params).catch((e) => {
9192
// If the asset already exists it will throw, but we just log
9293
// it since we don't want to overwrite assets.
9394
console.log('mongosh: asset already exists:', e);

packages/build/src/release.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ const release = async(config: Config) => {
8484
);
8585
}
8686
}
87+
88+
console.log('mongosh: finished release process.');
8789
};
8890

8991
export default release;

scripts/release.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ const runRelease = async() => {
99
await release(config);
1010
};
1111

12-
runRelease();
12+
runRelease().then(() => {
13+
process.exit(0);
14+
});

0 commit comments

Comments
 (0)