feat(utils): use commit timestamp to generate project version tags
This commit is contained in:
parent
efbdad226c
commit
7da0dd95b1
|
@ -66,8 +66,9 @@ List<String> getProjectVersionTags(String overrideChannel = '') {
|
||||||
String channel = overrideChannel ? overrideChannel : getProjectVersionDefaultChannel()
|
String channel = overrideChannel ? overrideChannel : getProjectVersionDefaultChannel()
|
||||||
String shortChannel = getProjectVersionShortChannel(channel)
|
String shortChannel = getProjectVersionShortChannel(channel)
|
||||||
|
|
||||||
String dateVersion = sh(script: 'date +%Y.%-m.%-d', returnStdout: true).trim()
|
String currrentCommitDate = sh(script: 'git show -s --format=%ct').trim()
|
||||||
String timestamp = sh(script: 'date +%-H%M', returnStdout: true).trim()
|
String dateVersion = sh(script: "TZ=Europe/Paris date -d '@${currrentCommitDate}' +%Y.%-m.%-d", returnStdout: true).trim()
|
||||||
|
String timestamp = sh(script: "TZ=Europe/Paris date -d '@${currrentCommitDate}' +%-H%M", returnStdout: true).trim()
|
||||||
String shortCommit = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
|
String shortCommit = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
|
||||||
|
|
||||||
String longTag = "${dateVersion}-${channel}.${timestamp}.${shortCommit}"
|
String longTag = "${dateVersion}-${channel}.${timestamp}.${shortCommit}"
|
||||||
|
|
Loading…
Reference in New Issue