mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 03:56:23 +08:00
build: add editor version in build log
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { getGitVersion, getCommitHash } = require('./scripts/gitInfo');
|
||||
const { dependencies } = require('./package.json')
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
@@ -12,6 +13,7 @@ const nextConfig = {
|
||||
CI: process.env.CI || null,
|
||||
VERSION: getGitVersion(),
|
||||
COMMIT_HASH: getCommitHash(),
|
||||
EDITOR_VERSION: dependencies['@blocksuite/editor']
|
||||
},
|
||||
images: {
|
||||
unoptimized: true,
|
||||
|
||||
@@ -4,6 +4,7 @@ type Config = {
|
||||
BUILD_DATE: string;
|
||||
NODE_ENV: string;
|
||||
PROJECT_NAME: string;
|
||||
EDITOR_VERSION: string;
|
||||
VERSION: string;
|
||||
CI?: string;
|
||||
COMMIT_HASH: string;
|
||||
@@ -28,6 +29,7 @@ const printBuildInfo = () => {
|
||||
'Environment:',
|
||||
`${publicRuntimeConfig.NODE_ENV}${publicRuntimeConfig.CI ? '(ci)' : ''}`
|
||||
);
|
||||
console.log('Editor Version:', publicRuntimeConfig.EDITOR_VERSION)
|
||||
console.log('Version:', publicRuntimeConfig.VERSION);
|
||||
console.log(
|
||||
'AFFiNE is an open source project, you can view its source code on GitHub!'
|
||||
|
||||
Reference in New Issue
Block a user