1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

add new versioning type for MTAs

This commit is contained in:
Christopher Fenner 2018-02-27 09:51:36 +01:00
parent 95520331e1
commit a4ef0a5af8

View File

@ -0,0 +1,21 @@
package com.sap.icd.jenkins.versioning
class MtaArtifactVersioning extends ArtifactVersioning {
private String baseVersion
protected MtaArtifactVersioning (script, configuration) {
super(script, configuration)
}
@Override
def getVersion() {
baseVersion = script.readYaml(file: configuration.filePath).version
return baseVersion
}
@Override
def setVersion(version) {
script.sh "sed -i 's/version: ${baseVersion}/version: ${newVersion}/g' ${configuration.filePath}"
}
}