Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -758,12 +758,20 @@ tasks:
sh: echo "${UNIVERSE_DIR:-$HOME/universe}"
cmds:
- |
echo "Checking out universe at SHA: $(cat .codegen/_openapi_sha)"
cd {{.UNIVERSE_DIR}}
if ! git cat-file -e $(cat {{.ROOT_DIR}}/.codegen/_openapi_sha) 2>/dev/null; then
git fetch --filter=blob:none origin master
if [ -z "$UNIVERSE_SKIP_CHECKOUT" ]; then
if ! git -C {{.UNIVERSE_DIR}} diff --quiet || ! git -C {{.UNIVERSE_DIR}} diff --cached --quiet; then
echo "Error: universe repo at {{.UNIVERSE_DIR}} has uncommitted changes; commit or stash them, or set UNIVERSE_SKIP_CHECKOUT=1 to skip checkout"
exit 1
fi
echo "Checking out universe at SHA: $(cat .codegen/_openapi_sha)"
cd {{.UNIVERSE_DIR}}
if ! git cat-file -e $(cat {{.ROOT_DIR}}/.codegen/_openapi_sha) 2>/dev/null; then
git fetch --filter=blob:none origin master
fi
git checkout $(cat {{.ROOT_DIR}}/.codegen/_openapi_sha)
else
echo "UNIVERSE_SKIP_CHECKOUT set; using current {{.UNIVERSE_DIR}} HEAD"
fi
git checkout $(cat {{.ROOT_DIR}}/.codegen/_openapi_sha)
- echo "Building genkit..."
- cd {{.UNIVERSE_DIR}} && bazel build //openapi/genkit
- echo "Generating CLI code..."
Expand Down
Loading