From c5efb84f9e261d0dc764f2bcd4ca901561c8bc17 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Thu, 21 Dec 2023 18:34:57 -0500 Subject: [PATCH] come on ci --- .github/workflows/tauri.yml | 2 ++ package.json | 10 +++++----- scripts/tauri-version.js | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tauri.yml b/.github/workflows/tauri.yml index 206ebea..93cf5dc 100644 --- a/.github/workflows/tauri.yml +++ b/.github/workflows/tauri.yml @@ -31,6 +31,8 @@ jobs: sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsoup-3.0-dev libjavascriptcoregtk-4.1-dev - name: Install Frontend Dependencies run: pnpm i + - name: Run version generator + run: pnpm run ci:prebuild - uses: spacebarchat/tauri-action@dev env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index af4f4af..43fd3cc 100644 --- a/package.json +++ b/package.json @@ -105,16 +105,16 @@ "url": "git+https://github.com/spacebarchat/client.git" }, "scripts": { - "build": "npm run ci:prebuild && tsc && vite build", + "build": "tsc && vite build", "ci:prebuild": "node scripts/tauri-version.js", "dev": "vite", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint:fix": "pnpx prettier . --write", "preview": "vite preview", - "tauri:dev": "tauri dev", - "tauri:build": "tauri build", - "tauri:android:dev": "tauri android dev", - "tauri:android:build": "tauri android build" + "tauri:dev": "pnpm run ci:prebuild && tauri dev", + "tauri:build": "pnpm run ci:prebuild && tauri build", + "tauri:android:dev": "pnpm run ci:prebuild && tauri android dev", + "tauri:android:build": "pnpm run ci:prebuild && tauri android build" }, "type": "module", "version": "0.1.1" diff --git a/scripts/tauri-version.js b/scripts/tauri-version.js index a0d2b8f..a59d213 100644 --- a/scripts/tauri-version.js +++ b/scripts/tauri-version.js @@ -2,10 +2,10 @@ import fs from "fs"; import path from "path"; import process from "process"; -if (!process.env.CI) { - console.log("Not running in CI, skipping. Please do not run this script manually!"); - process.exit(0); -} +// if (!process.env.CI) { +// console.log("Not running in CI, skipping. Please do not run this script manually!"); +// process.exit(0); +// } const GITHUB_RUN_ID = process.env.GITHUB_RUN_ID; const GITHUB_RUN_ATTEMPT = process.env.GITHUB_RUN_ATTEMPT;