Skip to content
Snippets Groups Projects
Commit 5df1c463 authored by insert's avatar insert
Browse files

Use different manifest for nightly.

parent 88459007
No related merge requests found
...@@ -37,6 +37,10 @@ function getVersion() { ...@@ -37,6 +37,10 @@ function getVersion() {
return readFileSync('VERSION').toString(); return readFileSync('VERSION').toString();
} }
const branch = getGitBranch();
const isNightly = branch !== 'production';
const iconPrefix = isNightly ? 'nightly-' : '';
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
preact(), preact(),
...@@ -45,9 +49,9 @@ export default defineConfig({ ...@@ -45,9 +49,9 @@ export default defineConfig({
filename: 'sw.ts', filename: 'sw.ts',
strategies: 'injectManifest', strategies: 'injectManifest',
manifest: { manifest: {
name: "REVOLT", name: isNightly ? "REVOLT nightly" : "REVOLT",
short_name: "REVOLT", short_name: "REVOLT",
description: "User-first, privacy-focused chat platform.", description: isNightly ? "Early preview builds of REVOLT." : "User-first, privacy-focused chat platform.",
categories: ["messaging"], categories: ["messaging"],
start_url: "/", start_url: "/",
display: "standalone", display: "standalone",
...@@ -55,12 +59,12 @@ export default defineConfig({ ...@@ -55,12 +59,12 @@ export default defineConfig({
background_color: "#101823", background_color: "#101823",
icons: [ icons: [
{ {
"src": "/assets/icons/android-chrome-192x192.png", "src": `/assets/icons/${iconPrefix}android-chrome-192x192.png`,
"type": "image/png", "type": "image/png",
"sizes": "192x192" "sizes": "192x192"
}, },
{ {
"src": "/assets/icons/android-chrome-512x512.png", "src": `/assets/icons/${iconPrefix}android-chrome-512x512.png`,
"type": "image/png", "type": "image/png",
"sizes": "512x512" "sizes": "512x512"
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment