Version pinned to 0.0.1 and staying on 0.x while this is in beta. `npm run ship` now exports twice from one build: /Applications/Work.app to test here, and ~/Desktop/Work-<version>.zip to send someone. One build, so a tester runs byte for byte what was verified rather than a second build that drifted. Packed with ditto rather than zip - a plain zip mangles the bundle's symlinks and it will not open on the far end. Settings: groups move up under apps, and the hidden-element list moves into its own window behind a one-line summary. It had grown to 21 selectors of framework class names and was most of the page, in front of the things people actually open Settings for. Reset puts apps, groups, hidden elements and zoom back to defaults, and leaves sessions alone - those live in WebKit's own store, and throwing them away would mean signing back into every tool to undo a change to the nav.
44 lines
1.4 KiB
Bash
Executable File
44 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Build once, then put the result in both places, every time:
|
|
#
|
|
# /Applications/Work.app the copy being tested here
|
|
# ~/Desktop/Work-<version>.zip the copy to send someone else
|
|
#
|
|
# One build, two destinations — so the thing a tester runs is byte for byte the
|
|
# thing that was just tested here, rather than a second build that drifted.
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
APP="Work.app"
|
|
BUILT="src-tauri/target/release/bundle/macos/$APP"
|
|
DEST="/Applications/$APP"
|
|
VERSION="$(node -p "require('./package.json').version")"
|
|
ZIP="$HOME/Desktop/Work-$VERSION.zip"
|
|
|
|
echo "==> building $VERSION"
|
|
npm run tauri build -- --bundles app
|
|
|
|
echo "==> quitting the running copy"
|
|
osascript -e 'quit app "Work"' >/dev/null 2>&1 || true
|
|
# A hung window would otherwise keep the bundle busy while it is replaced.
|
|
pkill -f "Work.app/Contents/MacOS" >/dev/null 2>&1 || true
|
|
for _ in 1 2 3 4 5 6 7 8 9 10; do
|
|
pgrep -f "Work.app/Contents/MacOS" >/dev/null || break
|
|
sleep 0.3
|
|
done
|
|
|
|
echo "==> installing to $DEST"
|
|
rm -rf "$DEST"
|
|
cp -R "$BUILT" "$DEST"
|
|
|
|
# ditto rather than zip: it keeps the bundle's symlinks and resource forks,
|
|
# which a plain zip mangles into an app that will not open on the other end.
|
|
echo "==> packaging to $ZIP"
|
|
rm -f "$ZIP"
|
|
ditto -c -k --sequesterRsrc --keepParent "$BUILT" "$ZIP"
|
|
|
|
echo "==> launching"
|
|
open "$DEST"
|
|
echo "==> done — $DEST and $ZIP"
|