ruby_everywhere 0.0.1 → 0.1.1
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.
- checksums.yaml +4 -4
- data/exe/every +6 -0
- data/exe/rbe +6 -0
- data/lib/everywhere/boot.rb +138 -0
- data/lib/everywhere/cli.rb +44 -0
- data/lib/everywhere/commands/build.rb +267 -0
- data/lib/everywhere/commands/dev.rb +61 -0
- data/lib/everywhere/commands/doctor.rb +54 -0
- data/lib/everywhere/commands/install.rb +264 -0
- data/lib/everywhere/commands/platform/auth_status.rb +42 -0
- data/lib/everywhere/commands/platform/build.rb +181 -0
- data/lib/everywhere/commands/platform/login.rb +81 -0
- data/lib/everywhere/commands/platform/logout.rb +34 -0
- data/lib/everywhere/commands/platform/runner.rb +224 -0
- data/lib/everywhere/commands/release.rb +142 -0
- data/lib/everywhere/config.rb +188 -0
- data/lib/everywhere/database.rb +89 -0
- data/lib/everywhere/framework.rb +197 -0
- data/lib/everywhere/ignore.rb +85 -0
- data/lib/everywhere/javascript/bridge.js +174 -0
- data/lib/everywhere/paths.rb +35 -0
- data/lib/everywhere/platform/client.rb +125 -0
- data/lib/everywhere/platform/credentials.rb +71 -0
- data/lib/everywhere/platform/snapshot.rb +48 -0
- data/lib/everywhere/png.rb +110 -0
- data/lib/everywhere/receipt.rb +185 -0
- data/lib/everywhere/shellout.rb +46 -0
- data/lib/everywhere/ui.rb +37 -0
- data/lib/everywhere/version.rb +11 -0
- data/lib/everywhere.rb +50 -0
- data/lib/ruby_everywhere.rb +2 -3
- data/support/github/build.yml +85 -0
- data/support/macos/entitlements.plist +23 -0
- data/support/macos/notarize.sh +123 -0
- data/support/shell/splash/index.html +40 -0
- data/support/shell/src-tauri/Cargo.lock +5446 -0
- data/support/shell/src-tauri/Cargo.toml +19 -0
- data/support/shell/src-tauri/build.rs +3 -0
- data/support/shell/src-tauri/capabilities/default.json +22 -0
- data/support/shell/src-tauri/gen/schemas/acl-manifests.json +1 -0
- data/support/shell/src-tauri/gen/schemas/capabilities.json +1 -0
- data/support/shell/src-tauri/gen/schemas/desktop-schema.json +2634 -0
- data/support/shell/src-tauri/gen/schemas/macOS-schema.json +2634 -0
- data/support/shell/src-tauri/icons/icon.png +0 -0
- data/support/shell/src-tauri/src/main.rs +723 -0
- data/support/shell/src-tauri/tauri.conf.json +20 -0
- metadata +80 -7
- data/README.md +0 -11
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# Sign (Developer ID + hardened runtime), notarize, and staple a .app bundle
|
|
4
|
+
# so it launches without Gatekeeper warnings on other Macs.
|
|
5
|
+
#
|
|
6
|
+
# Secrets never live in this script. Provide them via the environment — the
|
|
7
|
+
# easiest way is to source your release env first:
|
|
8
|
+
#
|
|
9
|
+
# source ~/Projects/atlastools.dev/atlas-workspaces/.env.release
|
|
10
|
+
# cli/support/macos/notarize.sh "example/dist/Example Notes.app"
|
|
11
|
+
#
|
|
12
|
+
# Required env vars (these match Tauri's names, so your existing .env works):
|
|
13
|
+
# APPLE_SIGNING_IDENTITY e.g. "Developer ID Application: Your Name (TEAMID)"
|
|
14
|
+
# APPLE_ID your Apple ID email
|
|
15
|
+
# APPLE_PASSWORD app-specific password (NOT your Apple account password)
|
|
16
|
+
# APPLE_TEAM_ID your 10-char team id
|
|
17
|
+
#
|
|
18
|
+
# Optional:
|
|
19
|
+
# NOTARY_PROFILE if set, uses `--keychain-profile "$NOTARY_PROFILE"`
|
|
20
|
+
# instead of APPLE_ID/APPLE_PASSWORD/APPLE_TEAM_ID.
|
|
21
|
+
# Create it once with:
|
|
22
|
+
# xcrun notarytool store-credentials "$NOTARY_PROFILE" \
|
|
23
|
+
# --apple-id "$APPLE_ID" --team-id "$APPLE_TEAM_ID" \
|
|
24
|
+
# --password "$APPLE_PASSWORD"
|
|
25
|
+
|
|
26
|
+
set -euo pipefail
|
|
27
|
+
|
|
28
|
+
APP="${1:?usage: notarize.sh /path/to/App.app}"
|
|
29
|
+
[ -d "$APP" ] || { echo "not a .app bundle: $APP" >&2; exit 1; }
|
|
30
|
+
|
|
31
|
+
# Load secrets from a dotenv-style file when ENV_FILE is set. This parses
|
|
32
|
+
# KEY=VALUE line-by-line and exports each var, so it handles unquoted values
|
|
33
|
+
# containing spaces/parens (e.g. APPLE_SIGNING_IDENTITY=Developer ID
|
|
34
|
+
# Application: Name (TEAM)) that plain `source .env.release` cannot.
|
|
35
|
+
#
|
|
36
|
+
# ENV_FILE=.env.release cli/support/macos/notarize.sh "App.app"
|
|
37
|
+
if [ -n "${ENV_FILE:-}" ]; then
|
|
38
|
+
[ -f "$ENV_FILE" ] || { echo "ENV_FILE not found: $ENV_FILE" >&2; exit 1; }
|
|
39
|
+
while IFS= read -r line || [ -n "$line" ]; do
|
|
40
|
+
line="${line%$'\r'}" # strip trailing CR (CRLF files)
|
|
41
|
+
case "$line" in ''|'#'*) continue ;; esac # skip blank / comment lines
|
|
42
|
+
[ "${line#*=}" = "$line" ] && continue # no '=' on the line -> skip
|
|
43
|
+
key="${line%%=*}"; val="${line#*=}"
|
|
44
|
+
key="${key#export }" # allow "export KEY=..."
|
|
45
|
+
key="${key#"${key%%[![:space:]]*}"}" # trim leading whitespace
|
|
46
|
+
key="${key%"${key##*[![:space:]]}"}" # trim trailing whitespace
|
|
47
|
+
# strip one layer of matching surrounding quotes from the value
|
|
48
|
+
if [ "${val#\"}" != "$val" ] && [ "${val%\"}" != "$val" ]; then val="${val#\"}"; val="${val%\"}"
|
|
49
|
+
elif [ "${val#\'}" != "$val" ] && [ "${val%\'}" != "$val" ]; then val="${val#\'}"; val="${val%\'}"
|
|
50
|
+
fi
|
|
51
|
+
export "$key=$val"
|
|
52
|
+
done < "$ENV_FILE"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
56
|
+
ENTITLEMENTS="$SCRIPT_DIR/entitlements.plist"
|
|
57
|
+
|
|
58
|
+
: "${APPLE_SIGNING_IDENTITY:?set APPLE_SIGNING_IDENTITY (source your .env.release)}"
|
|
59
|
+
|
|
60
|
+
# --- 1. Sign inside-out: nested Mach-O first, then the bundle --------------
|
|
61
|
+
echo "==> signing with: $APPLE_SIGNING_IDENTITY"
|
|
62
|
+
# Sign every executable/dylib under Contents/MacOS individually so nested
|
|
63
|
+
# helpers (app-server, the tebako binary) each carry the entitlements. The
|
|
64
|
+
# bundle sign at the end seals resources and the main executable.
|
|
65
|
+
while IFS= read -r -d '' bin; do
|
|
66
|
+
echo " sign $bin"
|
|
67
|
+
codesign --force --timestamp --options runtime \
|
|
68
|
+
--entitlements "$ENTITLEMENTS" \
|
|
69
|
+
--sign "$APPLE_SIGNING_IDENTITY" "$bin"
|
|
70
|
+
done < <(find "$APP/Contents/MacOS" -type f -print0)
|
|
71
|
+
|
|
72
|
+
echo " sign $APP"
|
|
73
|
+
codesign --force --timestamp --options runtime \
|
|
74
|
+
--entitlements "$ENTITLEMENTS" \
|
|
75
|
+
--sign "$APPLE_SIGNING_IDENTITY" "$APP"
|
|
76
|
+
|
|
77
|
+
echo "==> verifying signature"
|
|
78
|
+
codesign --verify --deep --strict --verbose=2 "$APP"
|
|
79
|
+
|
|
80
|
+
# --- 2. Notarize ----------------------------------------------------------
|
|
81
|
+
ZIP="${APP%.app}.zip"
|
|
82
|
+
echo "==> zipping for notarization: $ZIP"
|
|
83
|
+
rm -f "$ZIP"
|
|
84
|
+
ditto -c -k --keepParent "$APP" "$ZIP"
|
|
85
|
+
|
|
86
|
+
echo "==> submitting to Apple notary service (this can take a few minutes)"
|
|
87
|
+
if [ -n "${NOTARY_KEY:-}" ]; then
|
|
88
|
+
# App Store Connect API key (.p8) — how the Platform runner notarizes with a
|
|
89
|
+
# custodied key. NOTARY_KEY is a path to the .p8.
|
|
90
|
+
: "${NOTARY_KEY_ID:?set NOTARY_KEY_ID with NOTARY_KEY}"
|
|
91
|
+
: "${NOTARY_ISSUER:?set NOTARY_ISSUER with NOTARY_KEY}"
|
|
92
|
+
xcrun notarytool submit "$ZIP" \
|
|
93
|
+
--key "$NOTARY_KEY" --key-id "$NOTARY_KEY_ID" --issuer "$NOTARY_ISSUER" --wait
|
|
94
|
+
elif [ -n "${NOTARY_PROFILE:-}" ]; then
|
|
95
|
+
xcrun notarytool submit "$ZIP" --keychain-profile "$NOTARY_PROFILE" --wait
|
|
96
|
+
else
|
|
97
|
+
# Accept APPLE_APP_SPECIFIC_PASSWORD as an alias for APPLE_PASSWORD.
|
|
98
|
+
APPLE_PASSWORD="${APPLE_PASSWORD:-${APPLE_APP_SPECIFIC_PASSWORD:-}}"
|
|
99
|
+
: "${APPLE_ID:?set APPLE_ID or NOTARY_PROFILE}"
|
|
100
|
+
: "${APPLE_PASSWORD:?set APPLE_PASSWORD (or APPLE_APP_SPECIFIC_PASSWORD) or NOTARY_PROFILE}"
|
|
101
|
+
: "${APPLE_TEAM_ID:?set APPLE_TEAM_ID or NOTARY_PROFILE}"
|
|
102
|
+
xcrun notarytool submit "$ZIP" \
|
|
103
|
+
--apple-id "$APPLE_ID" --team-id "$APPLE_TEAM_ID" --password "$APPLE_PASSWORD" \
|
|
104
|
+
--wait
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# --- 3. Staple + verify ---------------------------------------------------
|
|
108
|
+
echo "==> stapling ticket"
|
|
109
|
+
xcrun stapler staple "$APP"
|
|
110
|
+
xcrun stapler validate "$APP"
|
|
111
|
+
|
|
112
|
+
echo "==> Gatekeeper assessment"
|
|
113
|
+
spctl -a -vvv "$APP"
|
|
114
|
+
|
|
115
|
+
# --- 4. Re-zip the stapled app for distribution ---------------------------
|
|
116
|
+
echo "==> re-zipping stapled app for distribution"
|
|
117
|
+
rm -f "$ZIP"
|
|
118
|
+
ditto -c -k --keepParent "$APP" "$ZIP"
|
|
119
|
+
|
|
120
|
+
echo ""
|
|
121
|
+
echo "✅ Done. Send this to your friend: $ZIP"
|
|
122
|
+
echo " (Stapled, so it works even offline. Send the .zip, not the raw .app —"
|
|
123
|
+
echo " zipping preserves the signature; AirDrop/Finder-copy of a bare .app can strip it.)"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Starting…</title>
|
|
6
|
+
<style>
|
|
7
|
+
:root { color-scheme: light dark; }
|
|
8
|
+
body {
|
|
9
|
+
margin: 0; height: 100vh; display: grid; place-items: center;
|
|
10
|
+
font-family: -apple-system, system-ui, sans-serif;
|
|
11
|
+
background: var(--bg, light-dark(#faf9f7, #1c1b1a));
|
|
12
|
+
color: light-dark(#333, #ddd);
|
|
13
|
+
}
|
|
14
|
+
.boot { text-align: center; }
|
|
15
|
+
.gem { font-size: 56px; animation: pulse 1.2s ease-in-out infinite; }
|
|
16
|
+
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.92); } }
|
|
17
|
+
h1 { margin: 12px 0 0; font-size: 17px; font-weight: 600; }
|
|
18
|
+
p { margin-top: 4px; font-size: 13px; opacity: 0.6; }
|
|
19
|
+
</style>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<div class="boot">
|
|
23
|
+
<div class="gem">💎</div>
|
|
24
|
+
<h1 id="name"></h1>
|
|
25
|
+
<p>Starting…</p>
|
|
26
|
+
</div>
|
|
27
|
+
<script>
|
|
28
|
+
// The shell injects window.__EVERYWHERE_CONFIG__ (from config/everywhere.yml)
|
|
29
|
+
// into every page, this splash included.
|
|
30
|
+
const cfg = window.__EVERYWHERE_CONFIG__ || {};
|
|
31
|
+
if (cfg.name) {
|
|
32
|
+
document.getElementById("name").textContent = cfg.name;
|
|
33
|
+
document.title = cfg.name;
|
|
34
|
+
}
|
|
35
|
+
const dark = matchMedia("(prefers-color-scheme: dark)").matches;
|
|
36
|
+
const bg = cfg.background_color && (dark ? cfg.background_color.dark : cfg.background_color.light);
|
|
37
|
+
if (bg) document.body.style.setProperty("--bg", bg);
|
|
38
|
+
</script>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|