mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 01:28:35 +02:00
Generic build version
This commit is contained in:
@@ -12,7 +12,7 @@ module.exports = {
|
|||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: ["./tsconfig.json"]
|
project: ["./tsconfig.json"]
|
||||||
},
|
},
|
||||||
ignorePatterns: ["src-tauri/**/*", "plugins/**/*"],
|
ignorePatterns: ["scripts/**/*", "src-tauri/**/*", "plugins/**/*"],
|
||||||
settings: {
|
settings: {
|
||||||
react: {
|
react: {
|
||||||
version: "detect"
|
version: "detect"
|
||||||
|
|||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -54,6 +54,10 @@ jobs:
|
|||||||
run: npm run lint
|
run: npm run lint
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npm test
|
run: npm test
|
||||||
|
- name: Set version
|
||||||
|
run: npm run replace-version
|
||||||
|
env:
|
||||||
|
YAAK_VERSION: ${{ github.ref_name }}
|
||||||
- uses: tauri-apps/tauri-action@v0
|
- uses: tauri-apps/tauri-action@v0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
"build:plugin:filter-xpath": "cd plugins/filter-xpath && vite build --emptyOutDir",
|
"build:plugin:filter-xpath": "cd plugins/filter-xpath && vite build --emptyOutDir",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"coverage": "vitest run --coverage",
|
"coverage": "vitest run --coverage",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install",
|
||||||
|
"replace-version": "node ./scripts/replace-version.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/commands": "^6.2.1",
|
"@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",
|
"productName": "yaak",
|
||||||
"version": "2024.7.0-beta.2",
|
"version": "__YAAK_VERSION__",
|
||||||
"identifier": "app.yaak.desktop",
|
"identifier": "app.yaak.desktop",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeBuildCommand": "npm run build",
|
"beforeBuildCommand": "npm run build",
|
||||||
|
|||||||
Reference in New Issue
Block a user