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