Debian Codegraph @

scripts/poe-tasks/check-files

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 # ensure consistent behaviour
4 src_dir="$(dirnamescip-shell system . . dirname. "$(realpathscip-shell system . . realpath. "$0")")"
5 source $src_dir/utils/_env.sh
6
7 # stop failing early, because we wouldn't do anything else than fail
8 set +e
9
10 # check that all dependencies are installed correctly
11 echoscip-shell system . . echo. -e "${yellow}Checking that all dependencies are properly installed...${reset}"
12 poetry install --dry-run --only main,dev,lint | grepscip-shell system . . grep. "0 install" > /dev/nullscip-shell filesystem . . `/dev/null`.
13 check_rv $?
14 echoscip-shell system . . echo.
15
16 # early exit when dependencies are not installed
17 if testscip-shell system . . test. "$aggregated_rv" -ne "0"; then
18 echoscip-shell system . . echo. -e "${red}Dependencies are not properly installed. Run this command to fix it:${reset}"
19 echoscip-shell system . . echo. -e " ${red}poetry install${reset}"
20 exit 1
21 fi
22
23 # check that setup.py is not behind pyproject.toml
24 echoscip-shell system . . echo. -e "${yellow}Checking setup.py${reset}"
25 python scripts/poe-tasks/utils/create_setup.py | diffscip-shell system . . diff. - setup.py
26 check_rv $?
27 python setup.py --help > /dev/nullscip-shell filesystem . . `/dev/null`.
28 check_rv $?
29 echoscip-shell system . . echo.
30
31 # check python/knot_resolver/constants.py
32 echoscip-shell system . . echo. -e "${yellow}python/knot_resolver/constants.py${reset}"
33 meson_setup_configure > /dev/nullscip-shell filesystem . . `/dev/null`.
34 diffscip-shell system . . diff. python/knot_resolver/constants.py $build_dir/python/knot_resolver/constants.py
35 check_rv $?
36 echoscip-shell system . . echo.
37
38 # check that doc/_static/config.schema.json is the latest
39 echoscip-shell system . . echo. -e "${yellow}Checking doc/_static/config.schema.json${reset}"
40 python -m knot_resolver.client schema | diffscip-shell system . . diff. - doc/_static/config.schema.json
41 check_rv $?
42 echoscip-shell system . . echo.
43
44 # fancy messages at the end :)
45 fancy_message
46
47 # exit with the aggregate return value
48 exit $aggregated_rv