-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathjustfile
More file actions
28 lines (24 loc) · 1.11 KB
/
justfile
File metadata and controls
28 lines (24 loc) · 1.11 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
_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
update-openapi VERSION:
# Download openapi.json from BloodHound's stage branch
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 edge help texts vs code registry
check-edges bh_root="../BloodHound":
#!/usr/bin/env bash
set -euo pipefail
python3 scripts/check_edge_docs.py --bh-root "{{bh_root}}"