File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -11,22 +11,24 @@ const __dirname = getDirName();
11
11
const execOptions = { ...process , cwd : __dirname , encoding : "utf-8" } ;
12
12
const commitsSinceOriginHead = execSync ( `git log --oneline origin/main..HEAD --format=%s` , execOptions ) . split ( "\n" ) ;
13
13
14
- const updatedClients = new Set ( ) ;
14
+ const updatedClientsSet = new Set ( ) ;
15
15
for ( const commitMessage of commitsSinceOriginHead ) {
16
16
const prefix = commitMessage . split ( ":" ) [ 0 ] ;
17
17
const scope = prefix . substring ( prefix . indexOf ( "(" ) + 1 , prefix . indexOf ( ")" ) ) ;
18
18
if ( scope && scope . startsWith ( "client-" ) ) {
19
- updatedClients . add ( `@aws-sdk/${ scope } ` ) ;
19
+ updatedClientsSet . add ( `@aws-sdk/${ scope } ` ) ;
20
20
}
21
21
}
22
+
23
+ const updatedClients = [ ...updatedClientsSet ] ;
22
24
console . info ( `Updated packages: ${ updatedClients } ` ) ;
23
25
24
- if ( updatedClients . size === 0 ) {
26
+ if ( updatedClients . length === 0 ) {
25
27
console . info ( `Couldn't find clients in commit messages:\n '${ commitsSinceOriginHead . join ( "\n" ) } '` ) ;
26
- process . exit ( 1 ) ;
28
+ process . exit ( 0 ) ;
27
29
}
28
30
29
31
const allTags = getAllTags ( ) ;
30
- const changedPackageTags = getPackageTags ( [ ... updatedClients ] ) ;
32
+ const changedPackageTags = getPackageTags ( updatedClients ) ;
31
33
const tagsToTest = changedPackageTags . filter ( ( tag ) => allTags . includes ( tag ) ) ;
32
34
runTestForTags ( tagsToTest ) ;
You can’t perform that action at this time.
0 commit comments