Skip to content

Commit

Permalink
Merge pull request #4982 from thc202/correct-release
Browse files Browse the repository at this point in the history
Correct release process
  • Loading branch information
kingthorin authored Oct 9, 2023
2 parents 64aeff0 + eb57816 commit f52faa5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release-add-on.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
java-version: 11
- name: Generate Release State
run: ./gradlew :addOns:generateReleaseStateLastCommit
- name: Generate JARs for BOM data
run: ./gradlew -Dorg.gradle.jvmargs=-Xmx4g jar
- name: Build and Release Add-On
env:
ZAPBOT_TOKEN: ${{ secrets.ZAPBOT_TOKEN }}
Expand Down
13 changes: 12 additions & 1 deletion addOns/addOns.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ val createPullRequestNextDevIter by tasks.registering(CreatePullRequest::class)
}

val releaseAddOn by tasks.registering
val allJarsForBom by tasks.registering

val crowdinExcludedProjects = setOf(
childProjects.get("dev"),
Expand Down Expand Up @@ -181,10 +182,20 @@ subprojects {
}
}

allJarsForBom {
dependsOn(tasks.named(JavaPlugin.JAR_TASK_NAME))
}

val cyclonedxBom by tasks.existing(CycloneDxTask::class) {
setDestination(file("$buildDir/reports/bom-all"))
mustRunAfter(allJarsForBom)
}

val cyclonedxRuntimeBom by tasks.registering(CycloneDxTask::class) {
setIncludeConfigs(listOf(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME))
setDestination(file("$buildDir/reports/bom-runtime"))
setOutputFormat("json")
mustRunAfter(allJarsForBom)
}

tasks.named<Jar>(AddOnPlugin.JAR_ZAP_ADD_ON_TASK_NAME) {
Expand Down Expand Up @@ -230,7 +241,6 @@ subprojects {

assets {
register("bom") {
val cyclonedxBom by tasks.existing(CycloneDxTask::class)
file.set(cyclonedxBom.map { project.layout.projectDirectory.file(File(it.destination.get(), "${it.outputName.get()}.json").absolutePath) })
contentType.set("application/json")
}
Expand All @@ -239,6 +249,7 @@ subprojects {

val crowdinUploadSourceFiles = if (useCrowdin) project.tasks.named("crowdinUploadSourceFiles") else null
releaseAddOn {
dependsOn(allJarsForBom)
dependsOn(createReleaseAddOn)

dependsOn(handleRelease)
Expand Down
2 changes: 1 addition & 1 deletion addOns/webdrivers/webdriverlinux/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=63
release=true
release=false
2 changes: 1 addition & 1 deletion addOns/webdrivers/webdrivermacos/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=63
release=true
release=false
2 changes: 1 addition & 1 deletion addOns/webdrivers/webdriverwindows/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=63
release=true
release=false

0 comments on commit f52faa5

Please sign in to comment.