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