mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 16:19:27 +00:00
fix(ci): rely on idempotent dependency sync
This commit is contained in:
+3
-11
@@ -3,22 +3,14 @@ set -euo pipefail
|
|||||||
|
|
||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
UI_DIR="$ROOT_DIR/ui"
|
UI_DIR="$ROOT_DIR/ui"
|
||||||
UI_SENTINEL="$UI_DIR/node_modules/@date-fns/tz/date/mini.js"
|
|
||||||
|
|
||||||
ensure_root_deps() {
|
ensure_root_deps() {
|
||||||
if [[ ! -d "$ROOT_DIR/node_modules" ]]; then
|
echo "[deps] Syncing root dependencies"
|
||||||
echo "[deps] Installing root dependencies"
|
(cd "$ROOT_DIR" && bun install --frozen-lockfile)
|
||||||
(cd "$ROOT_DIR" && bun install --frozen-lockfile)
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure_ui_deps() {
|
ensure_ui_deps() {
|
||||||
if [[ -d "$UI_DIR/node_modules" && -f "$UI_SENTINEL" ]]; then
|
echo "[deps] Syncing UI dependencies"
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "[deps] Reinstalling UI dependencies"
|
|
||||||
rm -rf "$UI_DIR/node_modules"
|
|
||||||
(cd "$UI_DIR" && bun install --frozen-lockfile)
|
(cd "$UI_DIR" && bun install --frozen-lockfile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user