mirror of
https://github.com/hcengineering/platform.git
synced 2025-03-15 10:37:52 +00:00
Remove 0.7 tagTime versioning
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
56a656bc6a
commit
04048c18f0
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@ -41,7 +41,6 @@ env:
|
|||||||
.prettierrc
|
.prettierrc
|
||||||
tools
|
tools
|
||||||
PublishTempFolder: publish_artifacts
|
PublishTempFolder: publish_artifacts
|
||||||
MODEL_VERSION_MODE: ${{ startsWith(github.ref, 'refs/tags/s') && 'tagTime' || 'file' }}
|
|
||||||
INIT_SCRIPTS_BRANCH: 'unified-init-scripts'
|
INIT_SCRIPTS_BRANCH: 'unified-init-scripts'
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
|
@ -17,21 +17,12 @@ const fs = require('fs')
|
|||||||
const path = require('path')
|
const path = require('path')
|
||||||
const exec = require('child_process').exec
|
const exec = require('child_process').exec
|
||||||
|
|
||||||
function main (mode) {
|
function main() {
|
||||||
exec('git describe --tags --abbrev=0', (err, stdout) => {
|
exec('git describe --tags --abbrev=0', (err, stdout) => {
|
||||||
if (err !== null) {
|
if (err !== null) {
|
||||||
console.log('"0.7.0"')
|
console.log('"0.6.0"')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const tag = stdout.trim()
|
|
||||||
|
|
||||||
if (mode === 'tagTime') {
|
|
||||||
// Take tagged git commit date as model version
|
|
||||||
exec(`git for-each-ref --shell --format="%(creatordate:format:%s)" "refs/tags/${tag}"`, (err, stdout) => {
|
|
||||||
console.log(`"0.7.${err === null ? stdout.trim().slice(1, -1) : 0}"`)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// Take version from file
|
// Take version from file
|
||||||
let version
|
let version
|
||||||
try {
|
try {
|
||||||
@ -42,13 +33,7 @@ function main (mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log(version)
|
console.log(version)
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let mode = process.env.MODEL_VERSION_MODE
|
main()
|
||||||
if (mode !== 'tagTime') {
|
|
||||||
mode = 'file'
|
|
||||||
}
|
|
||||||
|
|
||||||
main(mode)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user