File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,15 @@ const release = async () => {
8
8
verbose : true ,
9
9
} ) ;
10
10
11
+ const projectHasNewVersion = Object . entries ( projectsVersionData ) . filter (
12
+ ( [ _ , project ] ) => project . newVersion !== null
13
+ ) ;
14
+
15
+ if ( projectHasNewVersion . length === 0 ) {
16
+ console . log ( 'No project release needed' ) ;
17
+ process . exit ( 0 ) ;
18
+ }
19
+
11
20
await releaseChangelog ( {
12
21
versionData : projectsVersionData ,
13
22
version : workspaceVersion ,
@@ -32,7 +41,7 @@ const release = async () => {
32
41
// When a publish target fails, we want to fail the CI
33
42
process . exit ( 1 ) ;
34
43
}
35
- }
44
+ } ;
36
45
37
46
const gitPush = async ( ) => {
38
47
const commandArgs = [
@@ -43,15 +52,17 @@ const gitPush = async () => {
43
52
'--atomic' ,
44
53
] ;
45
54
46
- console . log ( "Pushing the current branch to the remote with the following command:" )
55
+ console . log (
56
+ 'Pushing the current branch to the remote with the following command:'
57
+ ) ;
47
58
console . log ( `git ${ commandArgs . join ( ' ' ) } ` ) ;
48
59
49
60
try {
50
61
await execCommand ( 'git' , commandArgs ) ;
51
62
} catch ( err ) {
52
63
throw new Error ( `Unexpected git push error: ${ err } ` ) ;
53
64
}
54
- }
65
+ } ;
55
66
56
67
const execCommand = async (
57
68
cmd : string ,
@@ -90,7 +101,6 @@ const execCommand = async (
90
101
}
91
102
} ) ;
92
103
} ) ;
93
- }
104
+ } ;
94
105
95
106
release ( ) ;
96
-
You can’t perform that action at this time.
0 commit comments