Skip to content
Snippets Groups Projects
Commit fc74eb17 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

write blank file

parent 26c80d74
No related branches found
No related tags found
2 merge requests!743Production Release | nshmp-haz,!742write blank file
tasks.withType(JavaCompile) {
doFirst {
try {
apply plugin: "com.palantir.git-version"
apply plugin: "com.palantir.git-version"
def versionFile = new File("${projectDir}/src/main/resources/version/nshmp-haz-version.json")
new File(versionFile.getParent()).mkdirs()
def versionFile = new File("${projectDir}/src/main/resources/version/nshmp-haz-version.json")
new File(versionFile.getParent()).mkdirs()
try {
def details = versionDetails()
def ciProjectUrl = System.getenv("CI_PROJECT_URL")
def branch = System.getenv("CI_COMMIT_BRANCH")
......@@ -23,7 +24,8 @@ tasks.withType(JavaCompile) {
def json = groovy.json.JsonOutput.toJson(versionInfo)
versionFile.write(groovy.json.JsonOutput.prettyPrint(json))
} catch (Exception e) {
println("Failed to create version file.")
println("Failed to create version file. Writing blank file.")
versionFile.write('{}')
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment