Updating airgap.gradle to properly create archive with latest-SNAPSHOT
@@ -118,12 +118,20 @@ task downloadDockerInspector() {
}
}
+def airGapVersion = version
+
+// the override.snaphot property should be set to true for a CI build so
+// that the version is omitted from a snapshot build artifact
+if (version.contains('SNAPSHOT') && "true" == project.findProperty('override.snapshot')) {
+ airGapVersion = 'latest-SNAPSHOT'
+}
+
task createAirGapZip(type: Zip) {
dependsOn build, copyApplicationProperties, downloadNugetInspector, copyGradleInspectorAndDependencies, downloadDockerInspector
from buildArtifactFolder
- include "${rootProject.name}-${version}.jar"
+ include "${rootProject.name}*.jar"
include 'packaged-inspectors/**'
include 'config/**'
- archiveName "${rootProject.name}-${version}-air-gap.zip"
+ archiveName "${rootProject.name}-${airGapVersion}-air-gap.zip"
destinationDir(file(distributionArtifactFolder))
}
