File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,11 @@ describe('draft', () => {
72
72
} ) ;
73
73
74
74
it ( 'uploads artifacts to download center' , ( ) => {
75
- expect ( uploadArtifactToDownloadCenter ) . to . have . been . callCount ( ALL_BUILD_VARIANTS . length * 2 ) ;
75
+ expect ( uploadArtifactToDownloadCenter ) . to . have . been . callCount ( ALL_BUILD_VARIANTS . length ) ;
76
76
} ) ;
77
77
78
78
it ( 'uploads the artifacts to the github release' , ( ) => {
79
- expect ( uploadReleaseAsset ) . to . have . been . callCount ( ALL_BUILD_VARIANTS . length * 2 ) ;
79
+ expect ( uploadReleaseAsset ) . to . have . been . callCount ( ALL_BUILD_VARIANTS . length ) ;
80
80
} ) ;
81
81
} ) ;
82
82
Original file line number Diff line number Diff line change 1
- import { promises as fs } from 'fs' ;
1
+ import { promises as fs , constants as fsConstants } from 'fs' ;
2
2
import path from 'path' ;
3
3
import { ALL_BUILD_VARIANTS , Config , getReleaseVersionFromTag } from './config' ;
4
4
import { uploadArtifactToDownloadCenter as uploadArtifactToDownloadCenterFn } from './download-center' ;
@@ -52,12 +52,18 @@ export async function runDraft(
52
52
signingComment : 'Evergreen Automatic Signing (mongosh)'
53
53
}
54
54
) ;
55
- const signatureFile = downloadedArtifact + '.sig' ;
55
+ let signatureFile : string | undefined = downloadedArtifact + '.sig' ;
56
+ try {
57
+ await fs . access ( signatureFile , fsConstants . R_OK ) ;
58
+ } catch ( err : any ) {
59
+ signatureFile = undefined ;
60
+ console . info ( `Skipping expected signature file ${ signatureFile } : ${ err . message } ` ) ;
61
+ }
56
62
57
63
await Promise . all ( [
58
64
[ downloadedArtifact , tarballFile . contentType ] ,
59
65
[ signatureFile , 'application/pgp-signature' ]
60
- ] . flatMap ( ( [ path , contentType ] ) => [
66
+ ] . flatMap ( ( [ path , contentType ] ) => path ? [
61
67
uploadToDownloadCenter (
62
68
path ,
63
69
config . downloadCenterAwsKey as string ,
@@ -68,7 +74,7 @@ export async function runDraft(
68
74
githubReleaseTag ,
69
75
{ path, contentType }
70
76
)
71
- ] ) ) ;
77
+ ] : [ ] ) ) ;
72
78
}
73
79
}
74
80
You can’t perform that action at this time.
0 commit comments