Remove 0.7 tagTime versioning

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-02-06 16:42:14 +07:00
parent 56a656bc6a
commit 04048c18f0
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2
2 changed files with 12 additions and 28 deletions

View File

@ -41,7 +41,6 @@ env:
.prettierrc
tools
PublishTempFolder: publish_artifacts
MODEL_VERSION_MODE: ${{ startsWith(github.ref, 'refs/tags/s') && 'tagTime' || 'file' }}
INIT_SCRIPTS_BRANCH: 'unified-init-scripts'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel

View File

@ -17,21 +17,12 @@ const fs = require('fs')
const path = require('path')
const exec = require('child_process').exec
function main (mode) {
function main() {
exec('git describe --tags --abbrev=0', (err, stdout) => {
if (err !== null) {
console.log('"0.7.0"')
console.log('"0.6.0"')
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
let version
try {
@ -42,13 +33,7 @@ function main (mode) {
}
console.log(version)
}
})
}
let mode = process.env.MODEL_VERSION_MODE
if (mode !== 'tagTime') {
mode = 'file'
}
main(mode)
main()