Initial import of LogDarioSeq baseline
Establishes version control for the personal Logseq DB fork before starting the server-client architecture migration and domain features described in docs/agent-guide and the approved implementation plan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
28
scripts/get-pkg-version.js
Normal file
28
scripts/get-pkg-version.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// This script file simply outputs the version in the package.json.
|
||||
// It is used as a helper by the continuous integration
|
||||
const path = require('path')
|
||||
const process = require('process')
|
||||
const fs = require('fs')
|
||||
|
||||
const content = fs.readFileSync(
|
||||
path.join(__dirname, '../src/main/frontend/version.cljs')
|
||||
)
|
||||
const pattern = /\(defonce version "(.*?)"\)/g
|
||||
|
||||
const match = pattern.exec(content)
|
||||
let ver = '0.0.1'
|
||||
if (match) {
|
||||
ver = match[1]
|
||||
} else {
|
||||
console.error('Could not find version in version.cljs')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (process.argv[2] === 'nightly' || process.argv[2] === '') {
|
||||
const today = new Date()
|
||||
console.log(
|
||||
ver + '-alpha+nightly.' + today.toISOString().split('T')[0].replaceAll('-', '')
|
||||
)
|
||||
} else {
|
||||
console.log(ver)
|
||||
}
|
||||
Reference in New Issue
Block a user