mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-28 02:48:38 +00:00
Packaging: Ensure upgrade_is_oss flag file is always deleted (#30732)
This commit ensures the delete of the upgrade_is_oss indicator for the packaging tests is always deleted before each run. It works by moving the check on version which skips the task into the doFirst block, replacing the onlyIf. closes #30682
This commit is contained in:
parent
e8b543b8cd
commit
2c7559c575
@ -11,6 +11,7 @@ import org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency
|
||||
import org.gradle.api.tasks.Copy
|
||||
import org.gradle.api.tasks.Delete
|
||||
import org.gradle.api.tasks.Exec
|
||||
import org.gradle.api.tasks.StopExecutionException
|
||||
import org.gradle.api.tasks.TaskState
|
||||
|
||||
import static java.util.Collections.unmodifiableList
|
||||
@ -285,8 +286,10 @@ class VagrantTestPlugin implements Plugin<Project> {
|
||||
dependsOn copyPackagingArchives
|
||||
doFirst {
|
||||
project.delete("${archivesDir}/upgrade_is_oss")
|
||||
if (project.extensions.esvagrant.upgradeFromVersion.before('6.3.0')) {
|
||||
throw new StopExecutionException("upgrade version is before 6.3.0")
|
||||
}
|
||||
}
|
||||
onlyIf { project.extensions.esvagrant.upgradeFromVersion.onOrAfter('6.3.0') }
|
||||
file "${archivesDir}/upgrade_is_oss"
|
||||
contents ''
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user