Is there a way to get the current tag ( or null if there is none ) for a job in a Jenkinsfile? The background is that I only want to build some artifacts ( android APKs ) when t
I'd consider returnStdout rather than writing to a file:
returnStdout
sh(returnStdout: true, script: "git tag --sort version:refname | tail -1").trim()