mirror of
https://github.com/Novattz/creamlinux-installer.git
synced 2026-01-31 07:42:52 -05:00
chore: bug fixes
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
import fs from 'node:fs'
|
import fs from 'node:fs'
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
import { execSync } from 'node:child_process'
|
import { execSync } from 'node:child_process'
|
||||||
|
import { fileURLToPath } from 'node:url'
|
||||||
|
|
||||||
|
// Recreate __dirname
|
||||||
|
const __filename = fileURLToPath(import.meta.url)
|
||||||
|
const __dirname = path.dirname(__filename)
|
||||||
|
|
||||||
// Define paths
|
// Define paths
|
||||||
const rustFilesPath = path.join(__dirname, '..', 'src-tauri')
|
const rustFilesPath = path.join(__dirname, '..', 'src-tauri')
|
||||||
@@ -103,7 +108,8 @@ function updateChangelog(changes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the current version and date
|
// Get the current version and date
|
||||||
const packageJson = require(path.join(__dirname, '..', 'package.json'))
|
const packageJsonPath = path.join(__dirname, '..', 'package.json')
|
||||||
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
||||||
const version = packageJson.version
|
const version = packageJson.version
|
||||||
const date = new Date().toISOString().split('T')[0]
|
const date = new Date().toISOString().split('T')[0]
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import fs from 'node:fs'
|
import fs from 'node:fs'
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
|
import { fileURLToPath } from 'node:url'
|
||||||
|
|
||||||
|
// Recreate __dirname
|
||||||
|
const __filename = fileURLToPath(import.meta.url)
|
||||||
|
const __dirname = path.dirname(__filename)
|
||||||
|
|
||||||
// Read the current version from package.json
|
// Read the current version from package.json
|
||||||
const packageJson = require('../package.json')
|
const packageJsonPath = path.join(__dirname, '..', 'package.json')
|
||||||
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
||||||
const version = packageJson.version
|
const version = packageJson.version
|
||||||
console.log(`Current version: ${version}`)
|
console.log(`Current version: ${version}`)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
import fs from 'node:fs'
|
import fs from 'node:fs'
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
|
import { execSync } from 'node:child_process'
|
||||||
|
import { fileURLToPath } from 'node:url'
|
||||||
|
|
||||||
|
// Recreate __dirname
|
||||||
|
const __filename = fileURLToPath(import.meta.url)
|
||||||
|
const __dirname = path.dirname(__filename)
|
||||||
|
|
||||||
// Read current version from package.json
|
// Read current version from package.json
|
||||||
const packageJsonPath = path.join(__dirname, '..', 'package.json')
|
const packageJsonPath = path.join(__dirname, '..', 'package.json')
|
||||||
const packageJson = require(packageJsonPath)
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
||||||
const version = packageJson.version
|
const version = packageJson.version
|
||||||
|
|
||||||
console.log(`Current version: ${version}`)
|
console.log(`Current version: ${version}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user