Skip to content

Commit eb827ea

Browse files
committed
fix: incorrect log message "ci detected"
1 parent 0c592e8 commit eb827ea

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/builder.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,21 +225,17 @@ export async function build(rawOptions?: CliOptions): Promise<void> {
225225
}
226226
else if (options.githubToken != null) {
227227
const tag = process.env.TRAVIS_TAG || process.env.APPVEYOR_REPO_TAG_NAME || process.env.CIRCLE_TAG
228-
if (tag != null && tag.length !== 0) {
228+
if (!isEmptyOrSpaces(tag)) {
229229
log(`Tag ${tag} is defined, so artifacts will be published`)
230230
options.publish = "onTag"
231231
isPublishOptionGuessed = true
232232
}
233-
else {if (isCi()) {
234-
log("CI detected, so artifacts will be published if draft release exists")
235-
options.publish = "onTagOrDraft"
236-
isPublishOptionGuessed = true
237-
}
233+
else if (isCi()) {
234+
log("CI detected, so artifacts will be published if draft release exists")
235+
options.publish = "onTagOrDraft"
236+
isPublishOptionGuessed = true
238237
}
239238
}
240-
else {
241-
log("CI detected, so artifacts will be published if draft release exists")
242-
}
243239
}
244240

245241
if (options.publish !== "never" && options.githubToken == null && isCi()) {

0 commit comments

Comments
 (0)