Commit 829465a Riccardo
committed
1 parent c4959b9 commit 829465a Copy full SHA for 829465a
File tree 3 files changed +15
-9
lines changed
3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ async function main() {
76
76
) ;
77
77
const token = argv . token ;
78
78
const releaseVersion = argv . toVersion ;
79
- failIfTagExists ( releaseVersion ) ;
79
+ failIfTagExists ( releaseVersion , 'release' ) ;
80
80
81
81
const { pushed} = await inquirer . prompt ( {
82
82
type : 'confirm' ,
Original file line number Diff line number Diff line change @@ -50,7 +50,13 @@ const releaseVersion = argv.toVersion;
50
50
const isLatest = argv . latest ;
51
51
const isDryRun = argv . dryRun ;
52
52
53
- failIfTagExists ( releaseVersion ) ;
53
+ const buildType = isDryRun
54
+ ? 'dry-run'
55
+ : isReleaseBranch ( branch )
56
+ ? 'release'
57
+ : 'nightly' ;
58
+
59
+ failIfTagExists ( releaseVersion , buildType ) ;
54
60
55
61
if ( branch && ! isReleaseBranch ( branch ) && ! isDryRun ) {
56
62
console . error ( `This needs to be on a release branch. On branch: ${ branch } ` ) ;
@@ -60,12 +66,6 @@ if (branch && !isReleaseBranch(branch) && !isDryRun) {
60
66
exit ( 1 ) ;
61
67
}
62
68
63
- const buildType = isDryRun
64
- ? 'dry-run'
65
- : isReleaseBranch ( branch )
66
- ? 'release'
67
- : 'nightly' ;
68
-
69
69
const { version} = parseVersion ( releaseVersion , buildType ) ;
70
70
if ( version == null ) {
71
71
console . error ( `Invalid version provided: ${ releaseVersion } ` ) ;
Original file line number Diff line number Diff line change @@ -115,7 +115,13 @@ function generateiOSArtifacts(
115
115
return tarballOutputPath ;
116
116
}
117
117
118
- function failIfTagExists ( version ) {
118
+ function failIfTagExists ( version , buildType ) {
119
+ // When dry-run in stable branch, the tag already exists.
120
+ // We are bypassing the tag-existence check when in a dry-run to have the CI pass
121
+ if ( buildType === 'dry-run' ) {
122
+ return ;
123
+ }
124
+
119
125
if ( checkIfTagExists ( version ) ) {
120
126
echo ( `Tag v${ version } already exists.` ) ;
121
127
echo ( 'You may want to rollback the last commit' ) ;
You can’t perform that action at this time.
0 commit comments