Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

fix(desktop): stage the working tree for the Windows machine

Luis Ortiz7a67ce662303
diff --git a/apps/desktop/scripts/windows-vm.sh b/apps/desktop/scripts/windows-vm.sh
index 0968f92..a70566c 100755
--- a/apps/desktop/scripts/windows-vm.sh
+++ b/apps/desktop/scripts/windows-vm.sh
@@ -41,8 +41,10 @@ EOF
exit 1
fi
-echo "==> staging $(git -C "$REPO" rev-parse --short HEAD)"
-git -C "$REPO" archive --format=tar.gz -o "$STAGE/mimik-src.tar.gz" HEAD
+echo "==> staging the working tree at $(git -C "$REPO" rev-parse --short HEAD)"
+git -C "$REPO" ls-files -z --cached --others --exclude-standard |
+ (cd "$REPO" && while IFS= read -r -d '' f; do [ -f "$f" ] && printf '%s\0' "$f"; done) |
+ tar -czf "$STAGE/mimik-src.tar.gz" -C "$REPO" --null -T -
sed "s|__PORT__|$PORT|g" "$HERE/windows-vm-setup.ps1" > "$STAGE/setup.ps1"
python3 -m http.server "$PORT" --bind 127.0.0.1 --directory "$STAGE" >/dev/null 2>&1 &