mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Generic build version
This commit is contained in:
@@ -12,7 +12,7 @@ module.exports = {
|
||||
parserOptions: {
|
||||
project: ["./tsconfig.json"]
|
||||
},
|
||||
ignorePatterns: ["src-tauri/**/*", "plugins/**/*"],
|
||||
ignorePatterns: ["scripts/**/*", "src-tauri/**/*", "plugins/**/*"],
|
||||
settings: {
|
||||
react: {
|
||||
version: "detect"
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -54,6 +54,10 @@ jobs:
|
||||
run: npm run lint
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
- name: Set version
|
||||
run: npm run replace-version
|
||||
env:
|
||||
YAAK_VERSION: ${{ github.ref_name }}
|
||||
- uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
"build:plugin:filter-xpath": "cd plugins/filter-xpath && vite build --emptyOutDir",
|
||||
"test": "vitest",
|
||||
"coverage": "vitest run --coverage",
|
||||
"prepare": "husky install"
|
||||
"prepare": "husky install",
|
||||
"replace-version": "node ./scripts/replace-version.cjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/commands": "^6.2.1",
|
||||
|
||||
9
scripts/replace-version.cjs
Normal file
9
scripts/replace-version.cjs
Normal file
@@ -0,0 +1,9 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const tauriConfig = fs.readFileSync(path.join(__dirname, '../src-tauri/tauri.conf.json'), 'utf8');
|
||||
if (!process.env.YAAK_VERSION) {
|
||||
throw new Error('YAAK_VERSION environment variable not set')
|
||||
}
|
||||
|
||||
console.log(tauriConfig.replaceAll('__YAAK_VERSION__', process.env.YAAK_VERSION.replace('v', '')));
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"productName": "yaak",
|
||||
"version": "2024.7.0-beta.2",
|
||||
"version": "__YAAK_VERSION__",
|
||||
"identifier": "app.yaak.desktop",
|
||||
"build": {
|
||||
"beforeBuildCommand": "npm run build",
|
||||
|
||||
Reference in New Issue
Block a user