mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-29 17:14:37 +03:00
Try to fix model check (#6227)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
3d42ba4e96
commit
8d841dc854
@ -5,6 +5,7 @@ exec('git describe --tags `git rev-list --tags --max-count=1`', (err, stdout, st
|
||||
process.exit(1)
|
||||
}
|
||||
const tag = stdout.trim()
|
||||
console.log('Check changes for tag:', tag)
|
||||
exec(`git fetch --tags && git diff ${tag} --name-only`, (err, stdout, stderr) => {
|
||||
if (err !== null) {
|
||||
process.exit(1)
|
||||
@ -13,8 +14,8 @@ exec('git describe --tags `git rev-list --tags --max-count=1`', (err, stdout, st
|
||||
const modelsChanged = changedFiles.some(file => file.startsWith('models/'))
|
||||
const versionChanged = changedFiles.some(file => file.endsWith('version.txt'))
|
||||
if (modelsChanged && !versionChanged) {
|
||||
console.log('Please update model version')
|
||||
process.exit(1)
|
||||
throw new Error('Please update model version')
|
||||
}
|
||||
console.log('OK')
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue
Block a user