mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
Use package JSON version
Use package JSON version Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
7d1df3c36d
commit
560e3debe3
@ -36,6 +36,8 @@ import { createModel as templatesModel } from '@anticrm/model-templates'
|
||||
import { createModel as textEditorModel } from '@anticrm/model-text-editor'
|
||||
import { createModel as viewModel } from '@anticrm/model-view'
|
||||
import { createModel as workbenchModel } from '@anticrm/model-workbench'
|
||||
import { readFileSync } from 'fs'
|
||||
import { join } from 'path'
|
||||
|
||||
const builder = new Builder()
|
||||
|
||||
@ -68,11 +70,14 @@ const builders = [
|
||||
for (const b of builders) {
|
||||
b(builder)
|
||||
}
|
||||
const packageFile = readFileSync(join(__dirname, '..', 'package.json')).toString()
|
||||
const json = JSON.parse(packageFile)
|
||||
const packageVersion = json.version.split('.')
|
||||
|
||||
export const version: Data<Version> = {
|
||||
major: 0,
|
||||
minor: 6,
|
||||
patch: 0
|
||||
major: parseInt(packageVersion[0]),
|
||||
minor: parseInt(packageVersion[1]),
|
||||
patch: parseInt(packageVersion[2])
|
||||
}
|
||||
|
||||
builder.createDoc(core.class.Version, core.space.Model, version, core.version.Model)
|
||||
|
Loading…
Reference in New Issue
Block a user