From 80f43ffe325b241f06190cf9d51a15885ed618a6 Mon Sep 17 00:00:00 2001 From: Nikita Galaiko Date: Thu, 28 Sep 2023 13:31:40 +0200 Subject: [PATCH] chore: update build scripts to include separate build commands for nightly and development modes --- package.json | 2 ++ packages/tauri/Cargo.toml | 2 +- packages/tauri/tauri.conf.json | 2 +- packages/tauri/tauri.conf.nightly.json | 3 +++ packages/tauri/tauri.conf.release.json | 3 +++ packages/ui/package.json | 2 ++ 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 25fdcb170..d8a186d7b 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,8 @@ "dev": "pnpm --filter @gitbutler/ui run dev", "test": "pnpm --filter @gitbutler/ui run test", "build": "pnpm --filter @gitbutler/ui run build", + "build:nightly": "pnpm --filter @gitbutler/ui run build:nightly", + "build:development": "pnpm --filter @gitbutler/ui run build:development", "check": "pnpm --filter @gitbutler/ui run check", "lint": "pnpm --filter @gitbutler/ui run lint", "format": "pnpm --filter @gitbutler/ui run format", diff --git a/packages/tauri/Cargo.toml b/packages/tauri/Cargo.toml index 0ee914142..b15001b17 100644 --- a/packages/tauri/Cargo.toml +++ b/packages/tauri/Cargo.toml @@ -48,7 +48,7 @@ sha2 = "0.10.6" similar = { version = "2.2.1", features = ["unicode"] } ssh-key = { version = "0.6.1", features = [ "alloc", "ed25519" ] } tantivy = "0.20.2" -tauri = { version = "1.4", features = [ "window-maximize", "window-unmaximize", "process-relaunch", "dialog-open", "fs-read-file", "path-all", "protocol-asset", "shell-open", "system-tray", "window-start-dragging"] } +tauri = { version = "1.4", features = [ "updater", "window-maximize", "window-unmaximize", "process-relaunch", "dialog-open", "fs-read-file", "path-all", "protocol-asset", "shell-open", "system-tray", "window-start-dragging"] } tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } tempfile = "3.8" thiserror = "1.0.44" diff --git a/packages/tauri/tauri.conf.json b/packages/tauri/tauri.conf.json index e1c9b488f..142472e34 100644 --- a/packages/tauri/tauri.conf.json +++ b/packages/tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "build": { "beforeDevCommand": "pnpm dev", - "beforeBuildCommand": "pnpm build", + "beforeBuildCommand": "pnpm build:development", "devPath": "http://localhost:1420", "distDir": "../ui/build", "withGlobalTauri": false diff --git a/packages/tauri/tauri.conf.nightly.json b/packages/tauri/tauri.conf.nightly.json index 431d731da..09d351f29 100644 --- a/packages/tauri/tauri.conf.nightly.json +++ b/packages/tauri/tauri.conf.nightly.json @@ -1,4 +1,7 @@ { + "build": { + "beforeBuildCommand": "pnpm build:nightly" + }, "package": { "productName": "GitButler Nightly" }, diff --git a/packages/tauri/tauri.conf.release.json b/packages/tauri/tauri.conf.release.json index 296fbad0a..c78cfe1ec 100644 --- a/packages/tauri/tauri.conf.release.json +++ b/packages/tauri/tauri.conf.release.json @@ -1,4 +1,7 @@ { + "build": { + "beforeBuildCommand": "pnpm build" + }, "package": { "productName": "GitButler" }, diff --git a/packages/ui/package.json b/packages/ui/package.json index 1e7597983..2af1056b7 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -6,6 +6,8 @@ "scripts": { "dev": "vite dev", "test": "vitest run --mode development", + "build:development": "vite build --mode development", + "build:nightly": "vite build --mode nightly", "build": "vite build", "check": "svelte-check --tsconfig ./tsconfig.json", "check:watch": "pnpm check --watch",