diff --git a/common/scripts/check_model_version.js b/common/scripts/check_model_version.js index f54810545d..295065d7df 100755 --- a/common/scripts/check_model_version.js +++ b/common/scripts/check_model_version.js @@ -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') }) }) \ No newline at end of file