fix: accept a submodule .git file in the workspace scripts
dev-host.sh and export-patches.sh tested the submodule with `[ -d cloudcli/.git ]`. In a normal submodule checkout .git is a *file* pointing at ../.git/modules/cloudcli, so the check failed and both scripts reported "not initialised" right after a successful bootstrap.sh. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fecf92c105
commit
7c6299053e
@ -34,7 +34,10 @@ port_owner() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_environment() {
|
require_environment() {
|
||||||
[ -d "$HOST_DIR/.git" ] || { echo "cloudcli/ is not initialised — run ./scripts/bootstrap.sh" >&2; exit 1; }
|
# -e, not -d: in a submodule checkout .git is a *file* pointing at
|
||||||
|
# ../.git/modules/cloudcli. It is only a directory when the fork was cloned
|
||||||
|
# into place by hand.
|
||||||
|
[ -e "$HOST_DIR/.git" ] || { echo "cloudcli/ is not initialised — run ./scripts/bootstrap.sh" >&2; exit 1; }
|
||||||
[ -d "$HOST_DIR/node_modules" ] || { echo "cloudcli/node_modules is missing — run ./scripts/bootstrap.sh" >&2; exit 1; }
|
[ -d "$HOST_DIR/node_modules" ] || { echo "cloudcli/node_modules is missing — run ./scripts/bootstrap.sh" >&2; exit 1; }
|
||||||
|
|
||||||
# The server needs these three compiled; npm >= 12 blocks install scripts by
|
# The server needs these three compiled; npm >= 12 blocks install scripts by
|
||||||
|
|||||||
@ -20,7 +20,8 @@ BRANCHES=(
|
|||||||
"feat/plugin-sidebar-surface:0003-feat-plugin-sidebar-surface.patch"
|
"feat/plugin-sidebar-surface:0003-feat-plugin-sidebar-surface.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
[ -d "$SRC/.git" ] || { echo "cloudcli/ submodule is not initialised — run ./scripts/bootstrap.sh" >&2; exit 1; }
|
# -e, not -d: in a submodule checkout .git is a file, not a directory.
|
||||||
|
[ -e "$SRC/.git" ] || { echo "cloudcli/ submodule is not initialised — run ./scripts/bootstrap.sh" >&2; exit 1; }
|
||||||
[ -d "$OUT" ] || { echo "plugin-taskwork/patches/ is missing — run ./scripts/bootstrap.sh" >&2; exit 1; }
|
[ -d "$OUT" ] || { echo "plugin-taskwork/patches/ is missing — run ./scripts/bootstrap.sh" >&2; exit 1; }
|
||||||
|
|
||||||
git -C "$SRC" rev-parse --verify --quiet "$BASE_TAG^{commit}" >/dev/null \
|
git -C "$SRC" rev-parse --verify --quiet "$BASE_TAG^{commit}" >/dev/null \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user