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:
parent
95520331e1
commit
a4ef0a5af8
21
src/com/sap/piper/versioning/MtaArtifactVersioning.groovy
Normal file
21
src/com/sap/piper/versioning/MtaArtifactVersioning.groovy
Normal 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}"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user