-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
42 lines (36 loc) · 877 Bytes
/
justfile
File metadata and controls
42 lines (36 loc) · 877 Bytes
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
set dotenv-load := true
root_dir := justfile_directory()
deps: deps-root
deps-root:
pnpm install
kill-port port:
#!/usr/bin/env bash
set -euo pipefail
pid=$(ss -tlnp | grep ":{{ port }} " | sed -n 's/.*pid=\([0-9]*\).*/\1/p' | head -1)
if [ -n "$pid" ]; then
echo "Killing process $pid on port {{ port }}"
kill -9 $pid
else
echo "No process found on port {{ port }}"
fi
lint target="all":
#!/usr/bin/env bash
set -euox pipefail
case "{{ target }}" in
all)
just lint justfile
just lint config
;;
justfile)
just --fmt --unstable
;;
config)
npx prettier --write "**/*.{json,yml,yaml,md}"
;;
*)
echo "Unknown target: {{ target }}"
exit 1
;;
esac
release-branch-push:
git push -f origin main:release