Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
40 lines (34 loc) · 1.55 KB
/
Copy pathjustfile
File metadata and controls
40 lines (34 loc) · 1.55 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
_default:
@just --list --unsorted
set positional-arguments
# Run git pruning on merged branches to clean up local workspace (run with `nuclear` to clean up orphaned branches)
prune-my-branches nuclear='no':
#!/usr/bin/env bash
git branch --merged| egrep -v "(^\*|master|main|dev)" | xargs git branch -d
git remote prune origin
if [ "{{ nuclear }}" == 'nuclear' ]; then
echo Switching to main to remove orphans
git switch main
git branch -vv | grep ': gone]' | grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -D
git switch -
fi
echo "Remaining Git Branches:"
git --no-pager branch
# Download openapi.json from BloodHound's stage branch
update-openapi VERSION:
curl -L --fail "https://raw.githubusercontent.com/SpecterOps/BloodHound/stage/{{ VERSION }}/packages/go/openapi/doc/openapi.json" -o docs/openapi.json || (echo "Failed to download OpenAPI spec for version {{ VERSION }}" && exit 1)
# Check docs coverage for documentable edges in the BloodHound CUE schema
check-edges bh_root="../BloodHound":
#!/usr/bin/env bash
set -euo pipefail
python3 scripts/check_edge_docs.py --bh-root "{{ bh_root }}"
# Find images in docs/assets and docs/images no longer referenced anywhere in the repo
find-unused-images:
#!/usr/bin/env bash
set -euo pipefail
python3 scripts/find_unused_images.py
# Delete images in docs/assets and docs/images no longer referenced anywhere in the repo
delete-unused-images:
#!/usr/bin/env bash
set -euo pipefail
python3 scripts/find_unused_images.py --delete