mirror of https://github.com/logseq/logseq
ci: use version.cljs instead
parent
fa003e6f57
commit
935a317c6e
|
@ -24,7 +24,7 @@ on:
|
|||
type: boolean
|
||||
required: true
|
||||
default: true
|
||||
schedule: # Every weekday at the noon (UTC) we run a scheduled nightly build
|
||||
schedule: # Every workday at the noon (UTC) we run a scheduled nightly build
|
||||
- cron: '0 12 * * MON-FRI'
|
||||
|
||||
env:
|
||||
|
@ -75,15 +75,20 @@ jobs:
|
|||
with:
|
||||
cli: ${{ env.CLOJURE_VERSION }}
|
||||
|
||||
- name: Compile CLJS
|
||||
run: yarn install && gulp build && yarn cljs:release-electron
|
||||
|
||||
- name: Retrieve tag version
|
||||
id: ref
|
||||
run: |
|
||||
pkgver=$(node ./scripts/get-pkg-version.js "${{ github.event.inputs.build-target }}")
|
||||
echo ::set-output name=version::$pkgver
|
||||
|
||||
- name: Update Nightly APP Version
|
||||
if: ${{ github.event.inputs.build-target == 'nightly' }}
|
||||
run: |
|
||||
sed -i 's/defonce version ".*"/defonce version "${{ steps.ref.outputs.version }}"/g' src/main/frontend/version.cljs
|
||||
|
||||
- name: Compile CLJS
|
||||
run: yarn install && gulp build && yarn cljs:release-electron
|
||||
|
||||
- name: Update APP Version
|
||||
run: |
|
||||
sed -i 's/"version": "0.0.1"/"version": "${{ steps.ref.outputs.version }}"/g' ./package.json
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "logseq",
|
||||
"version": "0.5.1",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"main": "static/electron.js",
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,11 +1,22 @@
|
|||
// This script file outputs the version in the package.json of project dir,
|
||||
// and optionally add nightly postfix.
|
||||
//
|
||||
// It is used as a helper by the continuous integration.
|
||||
// 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 ver = require(path.join(__dirname, '../package.json')).version
|
||||
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') {
|
||||
const today = new Date()
|
||||
|
|
Loading…
Reference in New Issue