-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
79 lines (62 loc) · 2.52 KB
/
Copy pathJustfile
File metadata and controls
79 lines (62 loc) · 2.52 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
# Foundry VTT data directory, git-ignored, created on first run
foundry_data := "foundry-data"
# List available recipes
default:
@just --list
# Start the Foundry VTT server
up:
mkdir -p {{foundry_data}}
docker compose up
# Start the Foundry VTT server in the background
up-detached:
mkdir -p {{foundry_data}}
docker compose up -d
# Stop the Foundry VTT server
down:
docker compose down
# Pull the newest image for the pinned Foundry VTT major version
pull:
docker compose pull
# Build all modules (output goes to each module's dist/)
build:
pnpm turbo build
# Watch a module and deploy on every rebuild to the Foundry data directory
# Usage: just dev sandbox
dev module:
pnpm turbo build --filter=@rpg-made-simple/{{module}}^...
FOUNDRY_DATA=`pwd`/{{foundry_data}} pnpm --filter @rpg-made-simple/{{module}} dev
# Build a single module and deploy it to the Foundry data directory
# Usage: just deploy sandbox
deploy module:
pnpm turbo build --filter=@rpg-made-simple/{{module}}^...
FOUNDRY_DATA=`pwd`/{{foundry_data}} pnpm --filter @rpg-made-simple/{{module}} build
# Start the documentation site in dev mode
docs:
pnpm --filter @rpg-made-simple/docs docs:dev
# Release a module: validates the code, then pushes a version tag to trigger GitHub Actions.
# The version is read from the package's package.json (e.g. 0.1.0 -> tags-v0.1.0).
# Works for any workspace package that ships a Foundry manifest, under modules/ or bridges/.
# Usage: just release tags
release module:
#!/usr/bin/env bash
set -euo pipefail
if [[ -n "$(git status --porcelain)" ]]; then
echo "Error: working tree is not clean. Commit or stash changes before releasing."
exit 1
fi
echo "Building dependencies for {{module}}..."
pnpm turbo build --filter=@rpg-made-simple/{{module}}^...
echo "Running typecheck for {{module}}..."
pnpm turbo typecheck --filter=@rpg-made-simple/{{module}}
echo "Building {{module}}..."
pnpm turbo build --filter=@rpg-made-simple/{{module}}
VERSION=$(pnpm --filter "@rpg-made-simple/{{module}}" list --depth -1 --json | node -e '
const [pkg] = JSON.parse(require("node:fs").readFileSync(0, "utf-8"));
if (pkg === undefined) { console.error("Unknown package: @rpg-made-simple/{{module}}"); process.exit(1); }
console.log(pkg.version);
')
TAG="{{module}}-v$VERSION"
echo "Tagging: $TAG"
git tag -a "$TAG" -m "Release $TAG"
git push origin "$TAG"
echo "Tag pushed. GitHub Actions will build and publish the release."