File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -288,12 +288,15 @@ task startPrometheus(type: SpawnProcessTask) {
288288 mustRunAfter ' :doctest:doctest'
289289
290290 doFirst {
291- download. run {
292- src getPrometheusBinaryLocation()
293- dest new File (" $projectDir /bin" , ' prometheus.tar.gz' )
291+ File prometheusFilePath = Paths . get(" $projectDir /bin" , " prometheus-${ prometheus_binary_version} .tar.gz" ). toFile()
292+ if (! prometheusFilePath. exists()) {
293+ download. run {
294+ src getPrometheusBinaryLocation()
295+ dest prometheusFilePath
296+ }
294297 }
295298 copy {
296- from tarTree(" $projectDir /bin/prometheus.tar.gz" )
299+ from tarTree(" $projectDir /bin/prometheus- ${ prometheus_binary_version } .tar.gz" )
297300 into " $projectDir /bin"
298301 }
299302 file(" $projectDir /bin" ). eachDir {
@@ -310,7 +313,6 @@ task startPrometheus(type: SpawnProcessTask) {
310313task stopPrometheus (type : KillProcessTask ) {
311314 doLast {
312315 file(" $projectDir /bin/prometheus" ). deleteDir()
313- file(" $projectDir /bin/prometheus.tar.gz" ). delete()
314316 }
315317}
316318
You can’t perform that action at this time.
0 commit comments