|
| 1 | +# Copyright (c) Humanitarian OpenStreetMap Team |
| 2 | +# |
| 3 | +# This file is part of Drone-TM. |
| 4 | +# |
| 5 | +# Drone-TM is free software: you can redistribute it and/or modify |
| 6 | +# it under the terms of the GNU General Public License as published by |
| 7 | +# the Free Software Foundation, either version 3 of the License, or |
| 8 | +# (at your option) any later version. |
| 9 | +# |
| 10 | +# Drone-TM is distributed in the hope that it will be useful, |
| 11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +# GNU General Public License for more details. |
| 14 | +# |
| 15 | +# You should have received a copy of the GNU General Public License |
| 16 | +# along with Drone-TM. If not, see <https:#www.gnu.org/licenses/>. |
| 17 | +# |
| 18 | + |
| 19 | +set dotenv-load |
| 20 | + |
| 21 | +# List available commands |
| 22 | +[private] |
| 23 | +default: |
| 24 | + just help |
| 25 | + |
| 26 | +# List available commands |
| 27 | +help: |
| 28 | + just --justfile {{justfile()}} --list |
| 29 | + |
| 30 | +# Run pre-commit hooks |
| 31 | +lint: |
| 32 | + #!/usr/bin/env sh |
| 33 | + cd {{justfile_directory()}}/src/backend |
| 34 | + uv run pre-commit run --all-files |
| 35 | + |
| 36 | +# Increment Drone-TM |
| 37 | +bump: |
| 38 | + #!/usr/bin/env sh |
| 39 | + cd {{justfile_directory()}}/src/backend |
| 40 | + uv run cz bump --check-consistency |
| 41 | + |
| 42 | +# Increment drone-flightplan (doesn't work yet!) |
| 43 | +bump-drone-flightplan: |
| 44 | + #!/usr/bin/env sh |
| 45 | + cd {{justfile_directory()}}/src/backend |
| 46 | + uv --project packages/drone-flightplan --directory packages/drone-flightplan run cz bump --check-consistency |
| 47 | + |
| 48 | +# Run docs website locally |
| 49 | +docs: |
| 50 | + #!/usr/bin/env sh |
| 51 | + cd {{justfile_directory()}}/src/backend |
| 52 | + uv sync --group docs |
| 53 | + uv run mkdocs serve --config-file ../../mkdocs.yml --dev-addr 0.0.0.0:3000 |
| 54 | + |
| 55 | +# Echo to terminal with blue colour |
| 56 | +[no-cd] |
| 57 | +_echo-blue text: |
| 58 | + #!/usr/bin/env sh |
| 59 | + printf "\033[0;34m%s\033[0m\n" "{{ text }}" |
| 60 | + |
| 61 | +# Echo to terminal with yellow colour |
| 62 | +[no-cd] |
| 63 | +_echo-yellow text: |
| 64 | + #!/usr/bin/env sh |
| 65 | + printf "\033[0;33m%s\033[0m\n" "{{ text }}" |
| 66 | + |
| 67 | +# Echo to terminal with red colour |
| 68 | +[no-cd] |
| 69 | +_echo-red text: |
| 70 | + #!/usr/bin/env sh |
| 71 | + printf "\033[0;41m%s\033[0m\n" "{{ text }}" |
0 commit comments