17 lines
327 B
Groovy
17 lines
327 B
Groovy
#!/usr/bin/env groovy
|
|
|
|
String call(Map config = [:]) {
|
|
Map defaults = [
|
|
dirtyFlag: '-dirty'
|
|
]
|
|
Map runConfig = defaults + config
|
|
|
|
checkout scm
|
|
|
|
GIT_TAG = sh(
|
|
script: "git describe --tags --always --dirty=${runConfig.dirtyFlag}",
|
|
returnStdout: true
|
|
).trim()
|
|
return GIT_TAG
|
|
}
|