File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -11,22 +11,24 @@ const __dirname = getDirName();
1111const execOptions = { ...process , cwd : __dirname , encoding : "utf-8" } ;
1212const commitsSinceOriginHead = execSync ( `git log --oneline origin/main..HEAD --format=%s` , execOptions ) . split ( "\n" ) ;
1313
14- const updatedClients = new Set ( ) ;
14+ const updatedClientsSet = new Set ( ) ;
1515for ( const commitMessage of commitsSinceOriginHead ) {
1616 const prefix = commitMessage . split ( ":" ) [ 0 ] ;
1717 const scope = prefix . substring ( prefix . indexOf ( "(" ) + 1 , prefix . indexOf ( ")" ) ) ;
1818 if ( scope && scope . startsWith ( "client-" ) ) {
19- updatedClients . add ( `@aws-sdk/${ scope } ` ) ;
19+ updatedClientsSet . add ( `@aws-sdk/${ scope } ` ) ;
2020 }
2121}
22+
23+ const updatedClients = [ ...updatedClientsSet ] ;
2224console . info ( `Updated packages: ${ updatedClients } ` ) ;
2325
24- if ( updatedClients . size === 0 ) {
26+ if ( updatedClients . length === 0 ) {
2527 console . info ( `Couldn't find clients in commit messages:\n '${ commitsSinceOriginHead . join ( "\n" ) } '` ) ;
26- process . exit ( 1 ) ;
28+ process . exit ( 0 ) ;
2729}
2830
2931const allTags = getAllTags ( ) ;
30- const changedPackageTags = getPackageTags ( [ ... updatedClients ] ) ;
32+ const changedPackageTags = getPackageTags ( updatedClients ) ;
3133const tagsToTest = changedPackageTags . filter ( ( tag ) => allTags . includes ( tag ) ) ;
3234runTestForTags ( tagsToTest ) ;
You can’t perform that action at this time.
0 commit comments