-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathJustfile
More file actions
100 lines (87 loc) · 2.7 KB
/
Justfile
File metadata and controls
100 lines (87 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright (c) Humanitarian OpenStreetMap Team
#
# This file is part of Drone-TM.
#
# Drone-TM is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Drone-TM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Drone-TM. If not, see <https:#www.gnu.org/licenses/>.
#
set dotenv-load
mod build 'tasks/build'
mod start 'tasks/start'
mod config 'tasks/config'
mod prep 'tasks/prep'
mod test 'tasks/test'
mod chart 'tasks/chart'
# List available commands
[private]
default:
just help
# List available commands
help:
just --justfile {{justfile()}} --list
# Run pre-commit hooks
lint:
#!/usr/bin/env sh
cd {{justfile_directory()}}/src/backend
uv run pre-commit run --all-files
# Increment Drone-TM
bump:
#!/usr/bin/env sh
cd {{justfile_directory()}}/src/backend
uv run cz bump --check-consistency
# Increment drone-flightplan (doesn't work yet!)
bump-drone-flightplan:
#!/usr/bin/env sh
cd {{justfile_directory()}}/src/backend
uv --project packages/drone-flightplan --directory packages/drone-flightplan run cz bump --check-consistency
# Run docs website locally
docs:
#!/usr/bin/env sh
cd {{justfile_directory()}}/src/backend
uv sync --group docs
uv run mkdocs serve --config-file ../../mkdocs.yml --dev-addr 0.0.0.0:3000
# Install curl if missing
[private]
_install-curl:
#!/usr/bin/env bash
set -e
if ! command -v curl &> /dev/null; then
echo "📦 Installing curl..."
if command -v apt-get &> /dev/null; then
sudo apt-get update -qq && sudo apt-get install -y curl
elif command -v yum &> /dev/null; then
sudo yum install -y curl
elif command -v apk &> /dev/null; then
sudo apk add --no-cache curl
else
echo "❌ Error: curl is not installed and no package manager found"
echo " Please install curl manually"
exit 1
fi
echo "✓ curl installed"
fi
# Echo to terminal with blue colour
[no-cd]
_echo-blue text:
#!/usr/bin/env sh
printf "\033[0;34m%s\033[0m\n" "{{ text }}"
# Echo to terminal with yellow colour
[no-cd]
_echo-yellow text:
#!/usr/bin/env sh
printf "\033[0;33m%s\033[0m\n" "{{ text }}"
# Echo to terminal with red colour
[no-cd]
_echo-red text:
#!/usr/bin/env sh
printf "\033[0;41m%s\033[0m\n" "{{ text }}"