mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Tweak basic bash syntax check to return level 0 such that yunorunner flags the job as 'failure' instead of 'technical error'
This commit is contained in:
parent
cf51d37285
commit
a98ec7d470
1 changed files with 7 additions and 1 deletions
|
@ -31,7 +31,13 @@ _STUFF_TO_RUN_BEFORE_INITIAL_SNAPSHOT()
|
||||||
[[ ${PIPESTATUS[0]} == 0 ]] || syntax_issue=true
|
[[ ${PIPESTATUS[0]} == 0 ]] || syntax_issue=true
|
||||||
done
|
done
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
[[ $syntax_issue == false ]] && log_report_test_success || log_critical "Obvious syntax issues found which will make the scripts crash ... not running the actual tests until these are fixed"
|
if [[ $syntax_issue == false ]]
|
||||||
|
then
|
||||||
|
log_report_test_success
|
||||||
|
else
|
||||||
|
echo "{'level': 0}" > $result_json
|
||||||
|
log_critical "Obvious syntax issues found which will make the scripts crash ... not running the actual tests until these are fixed"
|
||||||
|
fi
|
||||||
|
|
||||||
# We filter apt deps starting with $app_id to prevent stupid issues with for example cockpit and transmission where the apt package is not properly reinstalled on reinstall-after-remove test ...
|
# We filter apt deps starting with $app_id to prevent stupid issues with for example cockpit and transmission where the apt package is not properly reinstalled on reinstall-after-remove test ...
|
||||||
local apt_deps=$(python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); P = t['resources'].get('apt', {}).get('packages', ''); P = P.replace(',', ' ').split() if isinstance(P, str) else P; P = [p for p in P if p != '$app_id' and not p.startswith('$app_id-')]; print(' '.join(P));" < $package_path/manifest.toml)
|
local apt_deps=$(python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); P = t['resources'].get('apt', {}).get('packages', ''); P = P.replace(',', ' ').split() if isinstance(P, str) else P; P = [p for p in P if p != '$app_id' and not p.startswith('$app_id-')]; print(' '.join(P));" < $package_path/manifest.toml)
|
||||||
|
|
Loading…
Add table
Reference in a new issue