Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions rewrite-javascript/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,8 @@ val npmPublish = tasks.register<NpmTask>("npmPublish") {
.directory(file("rewrite"))
.redirectErrorStream(true)
.start()
process.waitFor()
val output = process.inputStream.bufferedReader().readText().trim()
val alreadyPublished = output.contains(versionToCheck)
val alreadyPublished = process.waitFor() == 0 && output.lines().any { it.trim() == versionToCheck }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be contains instead of ==?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Applied just now; ready to merge if you agree (feel free to push the button as I'm out for a bit here).

if (alreadyPublished) {
logger.lifecycle("Skipping npmPublish: @openrewrite/rewrite@$versionToCheck already published")
}
Expand Down
Loading