Skip to content

Commit 5db401f

Browse files
authored
Merge pull request #10938 from internetarchive/pwa-manifest-script
adding twa-manifest.json to repo + scripts/build_pwa.sh
2 parents 75430d1 + 2ee0e8a commit 5db401f

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,13 @@ node_modules/
3737
venv/
3838
*.c
3939
*.so
40+
# Ignore Gradle build cache
41+
.gradle/
42+
43+
# Ignore build outputs
44+
app-release*
45+
46+
android.keystore
47+
48+
# Ignore checksum file if it’s generated during build
49+
manifest-checksum.txt

scripts/build_pwa.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# Check if git is installed
5+
if ! command -v git &> /dev/null; then
6+
echo "Error: git is not installed. Please install git first." >&2
7+
exit 1
8+
fi
9+
10+
if ! command -v npm &> /dev/null; then
11+
echo "Error: npm is not installed. Please install Node.js and npm first." >&2
12+
exit 1
13+
fi
14+
15+
# Clean or update /tmp/olsystem folder
16+
if [ -d /tmp/olsystem ]; then
17+
echo "Updating olsystem repo..."
18+
cd /tmp/olsystem
19+
git pull origin master
20+
cd -
21+
else
22+
echo "Cloning olsystem repo..."
23+
git clone git@github.com:internetarchive/olsystem.git /tmp/olsystem
24+
fi
25+
26+
# Install bubblewrap if missing
27+
if ! command -v bubblewrap &> /dev/null; then
28+
echo "bubblewrap not found. Installing..."
29+
npm install -g @bubblewrap/cli
30+
fi
31+
32+
# Run bubblewrap build command from the project root
33+
bubblewrap build

twa-manifest.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"packageId": "org.openlibrary.testing.twa",
3+
"host": "openlibrary.org",
4+
"name": "Open Library: A page for every book published",
5+
"launcherName": "Open Library",
6+
"display": "standalone",
7+
"themeColor": "#E2DCC5",
8+
"themeColorDark": "#000000",
9+
"navigationColor": "#000000",
10+
"navigationColorDark": "#000000",
11+
"navigationDividerColor": "#000000",
12+
"navigationDividerColorDark": "#000000",
13+
"backgroundColor": "#E2DCC5",
14+
"enableNotifications": true,
15+
"startUrl": "/?source=pwa",
16+
"iconUrl": "https://openlibrary.org/static/images/openlibrary-512x512.png",
17+
"maskableIconUrl": "https://openlibrary.org/static/images/openlibrary-512x512-mask.png",
18+
"splashScreenFadeOutDuration": 300,
19+
"signingKey": {
20+
"path": "/tmp/olsystem/etc/pwa/openlibrary-upload-key.jks",
21+
"alias": "upload"
22+
},
23+
"appVersionName": "7",
24+
"appVersionCode": 7,
25+
"shortcuts": [],
26+
"generatorApp": "bubblewrap-cli",
27+
"webManifestUrl": "https://openlibrary.org/static/manifest.json",
28+
"fallbackType": "customtabs",
29+
"features": {},
30+
"alphaDependencies": {
31+
"enabled": false
32+
},
33+
"enableSiteSettingsShortcut": true,
34+
"isChromeOSOnly": false,
35+
"isMetaQuest": false,
36+
"fullScopeUrl": "https://openlibrary.org/",
37+
"minSdkVersion": 21,
38+
"shareTarget": {
39+
"action": "https://openlibrary.org/search",
40+
"method": "GET",
41+
"params": {
42+
"text": "q"
43+
}
44+
},
45+
"orientation": "default",
46+
"fingerprints": [],
47+
"additionalTrustedOrigins": [],
48+
"retainedBundles": [],
49+
"protocolHandlers": [],
50+
"fileHandlers": [],
51+
"launchHandlerClientMode": "",
52+
"appVersion": "7"
53+
}

0 commit comments

Comments
 (0)