create-workframe 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -57,12 +57,13 @@ _wf_sync_from_pack_dir() {
|
|
|
57
57
|
echo "Syncing workframe-ui/public -> $UI_DIR"
|
|
58
58
|
_wf_sync_tree "$pkg/workframe-ui/public" "$UI_DIR"
|
|
59
59
|
fi
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
if [[ -d "$pkg/scripts" ]]; then
|
|
61
|
+
for script in "$pkg/scripts"/*.sh; do
|
|
62
|
+
[[ -f "$script" ]] || continue
|
|
63
|
+
cp -a "$script" "$SCRIPTS_DIR/$(basename "$script")"
|
|
64
|
+
chmod +x "$SCRIPTS_DIR/$(basename "$script")" 2>/dev/null || true
|
|
65
|
+
done
|
|
66
|
+
fi
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
_wf_apply_npm_tarball() {
|
|
@@ -174,7 +175,16 @@ fi
|
|
|
174
175
|
|
|
175
176
|
echo "Rebuilding workframe-api and workframe-supervisor..."
|
|
176
177
|
workframe_compose build workframe-api workframe-supervisor
|
|
177
|
-
|
|
178
|
+
if [[ "${WORKFRAME_UPDATE_FROM_SUPERVISOR:-}" == "1" ]]; then
|
|
179
|
+
# ponytail: supervisor cannot recreate itself inside the stack.apply request — defer after handler returns
|
|
180
|
+
workframe_compose up -d --build --no-deps workframe-api
|
|
181
|
+
(
|
|
182
|
+
sleep 3
|
|
183
|
+
workframe_compose up -d --no-deps workframe-supervisor
|
|
184
|
+
) >/tmp/workframe-supervisor-restart.log 2>&1 &
|
|
185
|
+
else
|
|
186
|
+
workframe_compose up -d --build --no-deps workframe-api workframe-supervisor
|
|
187
|
+
fi
|
|
178
188
|
|
|
179
189
|
if workframe_compose config --services 2>/dev/null | grep -qx workframe-ui; then
|
|
180
190
|
workframe_compose up -d --no-deps workframe-ui || workframe_compose restart workframe-ui || true
|
|
@@ -93,6 +93,7 @@ def _stack_apply(target: str, *, workframe_version: str = "", workframe_tarball:
|
|
|
93
93
|
env = os.environ.copy()
|
|
94
94
|
version = str(workframe_version or "").strip()
|
|
95
95
|
tarball = str(workframe_tarball or "").strip()
|
|
96
|
+
env["WORKFRAME_UPDATE_FROM_SUPERVISOR"] = "1"
|
|
96
97
|
if tarball and target in {"workframe", "all"}:
|
|
97
98
|
env["WORKFRAME_UPDATE_TARBALL"] = tarball
|
|
98
99
|
if version:
|