@onnie81/murdoku-spor 1.2.2 → 1.2.3
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/murdoku.bundle +0 -0
- package/package.json +1 -1
- package/scripts/npm-server-deploy.sh +17 -5
package/murdoku.bundle
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -32,17 +32,29 @@ mkdir -p "$APP"
|
|
|
32
32
|
find "$APP" -mindepth 1 -maxdepth 1 ! -name .git ! -name .version -exec rm -rf {} +
|
|
33
33
|
cp -a "$src"/. "$APP"/
|
|
34
34
|
|
|
35
|
-
# the deploy runner updates itself from the package
|
|
35
|
+
# the deploy runner updates itself from the package and re-executes so the
|
|
36
|
+
# rest of THIS deploy runs with the fresh logic (cmp guard prevents looping)
|
|
36
37
|
if [ -f "$APP/scripts/npm-server-deploy.sh" ] && ! cmp -s "$APP/scripts/npm-server-deploy.sh" /usr/local/bin/murdoku-deploy; then
|
|
37
38
|
install -m 755 "$APP/scripts/npm-server-deploy.sh" /usr/local/bin/murdoku-deploy || true
|
|
38
|
-
echo "$(date -Is) deploy runner self-updated"
|
|
39
|
+
echo "$(date -Is) deploy runner self-updated — re-executing"
|
|
40
|
+
rm -rf "$tmp"
|
|
41
|
+
exec env FORCE=1 /usr/local/bin/murdoku-deploy "$APP" "$BRANCH"
|
|
39
42
|
fi
|
|
40
43
|
|
|
41
|
-
# refresh real git history from the bundle carried in the package
|
|
44
|
+
# refresh real git history from the bundle carried in the package.
|
|
45
|
+
# NOTE: fetch into a side ref — git refuses to fetch into the checked-out
|
|
46
|
+
# branch, which is what froze the reported sha at the first deploy.
|
|
42
47
|
if command -v git >/dev/null 2>&1 && [ -f "$src/murdoku.bundle" ]; then
|
|
43
48
|
if [ ! -d "$APP/.git" ]; then git -C "$APP" init -q; fi
|
|
44
|
-
git -C "$APP" fetch -f "$src/murdoku.bundle" 'refs/heads/main:refs/heads/
|
|
45
|
-
|
|
49
|
+
if git -C "$APP" fetch -f "$src/murdoku.bundle" 'refs/heads/main:refs/heads/incoming' 2>/dev/null; then
|
|
50
|
+
NEWREF=$(git -C "$APP" rev-parse --verify incoming 2>/dev/null || true)
|
|
51
|
+
if [ -n "$NEWREF" ]; then
|
|
52
|
+
git -C "$APP" update-ref refs/heads/main "$NEWREF"
|
|
53
|
+
git -C "$APP" symbolic-ref HEAD refs/heads/main 2>/dev/null || true
|
|
54
|
+
git -C "$APP" reset --hard main >/dev/null 2>&1 || true
|
|
55
|
+
git -C "$APP" update-ref -d refs/heads/incoming 2>/dev/null || true
|
|
56
|
+
fi
|
|
57
|
+
fi
|
|
46
58
|
fi
|
|
47
59
|
|
|
48
60
|
cd "$APP"
|