You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2023/05/19 19:07:27 UTC
[jmeter] 02/02: chore: ensure verifyReleaseDependencies can be executed several times in snapshot builds
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
commit a67b5e04787ade309475c164b851331867eb19c7
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Fri May 19 22:06:48 2023 +0300
chore: ensure verifyReleaseDependencies can be executed several times in snapshot builds
Previously the second execution was UP-TO-DATE, so the task did not print the diff.
---
src/dist/build.gradle.kts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/dist/build.gradle.kts b/src/dist/build.gradle.kts
index 39b0c4e7c5..f0a2f28983 100644
--- a/src/dist/build.gradle.kts
+++ b/src/dist/build.gradle.kts
@@ -173,6 +173,13 @@ val verifyReleaseDependencies by tasks.registering {
inputs.file(expectedLibs)
val actualLibs = File(buildDir, "dist/expected_release_jars.csv")
outputs.file(actualLibs)
+ val ignoreJarsMismatch = version.toString().endsWith("-SNAPSHOT")
+ if (ignoreJarsMismatch || updateExpectedJars) {
+ // The task does not fail in case of -SNAPSHOT version, so we make the task never UP-TO-DATE
+ // in that case. Otherwise, the task never executes on the second request, even if the user runs with
+ // -PupdateExpectedJars
+ outputs.upToDateWhen { false }
+ }
doLast {
val caseInsensitive: Comparator<String> = compareBy(String.CASE_INSENSITIVE_ORDER, { it })
@@ -237,7 +244,7 @@ val verifyReleaseDependencies by tasks.registering {
if (updateExpectedJars) {
println("Updating ${expectedLibs.relativeTo(rootDir)}")
actualLibs.copyTo(expectedLibs, overwrite = true)
- } else if (version.toString().endsWith("-SNAPSHOT")) {
+ } else if (ignoreJarsMismatch) {
// Renovate requires self-hosted runner for executing postUpgradeTasks,
// so we can't make Renovate to update expected_release_jars.csv at the moment
logger.lifecycle(sb.toString())