mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-08-08 15:03:49 +08:00
try to fix wrong ci script - file is not exist
This commit is contained in:
1
.github/workflows/build-ui.yml
vendored
1
.github/workflows/build-ui.yml
vendored
@@ -49,5 +49,4 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd packages/ui
|
||||
node ./scripts/github-ci-build.mjs
|
||||
1
.github/workflows/release-ui.yml
vendored
1
.github/workflows/release-ui.yml
vendored
@@ -28,7 +28,6 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd packages/ui
|
||||
node ./scripts/github-ci-build.mjs
|
||||
|
||||
- name: Create Release
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"dev:geek-auto-start-chat-with-boss-daemon-only": "cross-env MAIN_BOSSGEEKGO_UI_RUN_MODE=geekAutoStartWithBossDaemon pnpm run dev",
|
||||
"dev:check-and-download-dependencies-for-init-only": "cross-env MAIN_BOSSGEEKGO_UI_RUN_MODE=checkAndDownloadDependenciesForInit pnpm run dev",
|
||||
"dev:launch-bosszhipin-login-page-with-preload-extension-only": "cross-env MAIN_BOSSGEEKGO_UI_RUN_MODE=launchBossZhipinLoginPageWithPreloadExtension pnpm run dev",
|
||||
"build": "node scripts/build.mjs && electron-vite build",
|
||||
"build": "node scripts/run-build-sqlite-plugin.mjs && electron-vite build",
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.vue --fix",
|
||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
import build from './steps/build.mjs'
|
||||
|
||||
build()
|
||||
import buildUiOnCurrentPlatform from './steps/build-ui-on-current-platform.mjs'
|
||||
buildUiOnCurrentPlatform()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import build from './steps/build.mjs'
|
||||
import buildUiOnCurrentPlatform from './steps/build-ui-on-current-platform.mjs';
|
||||
import increasePackageVersion from './steps/increase-package-version.mjs'
|
||||
import releaseVersion from './steps/release-version.mjs'
|
||||
;(async () => {
|
||||
await increasePackageVersion()
|
||||
await build()
|
||||
await buildUiOnCurrentPlatform()
|
||||
await releaseVersion()
|
||||
})()
|
||||
|
||||
2
packages/ui/scripts/run-build-sqlite-plugin.mjs
Normal file
2
packages/ui/scripts/run-build-sqlite-plugin.mjs
Normal file
@@ -0,0 +1,2 @@
|
||||
import buildSqlitePlugin from './steps/build-sqlite-plugin.mjs'
|
||||
buildSqlitePlugin()
|
||||
26
packages/ui/scripts/steps/build-sqlite-plugin.mjs
Normal file
26
packages/ui/scripts/steps/build-sqlite-plugin.mjs
Normal file
@@ -0,0 +1,26 @@
|
||||
import childProcess from 'node:child_process'
|
||||
import path from 'node:path'
|
||||
import url from 'node:url'
|
||||
|
||||
export default function buildSqlitePlugin() {
|
||||
const rawCwd = process.cwd()
|
||||
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
|
||||
|
||||
const sqlitePluginDirPath = path.join(__dirname, '../../../sqlite-plugin')
|
||||
process.chdir(sqlitePluginDirPath)
|
||||
try {
|
||||
const sqlitePluginBuildProcess = childProcess.spawnSync('pnpm run build', {
|
||||
stdio: ['inherit', 'inherit', 'inherit'],
|
||||
shell: true
|
||||
})
|
||||
process.chdir(rawCwd)
|
||||
if (sqlitePluginBuildProcess.error) {
|
||||
throw sqlitePluginBuildProcess.error
|
||||
}
|
||||
} catch (error) {
|
||||
process.chdir(rawCwd)
|
||||
console.error('error encounter when build sqlite plugin:')
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
30
packages/ui/scripts/steps/build-ui-on-current-platform.mjs
Normal file
30
packages/ui/scripts/steps/build-ui-on-current-platform.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import childProcess from 'node:child_process'
|
||||
import os from 'node:os'
|
||||
|
||||
const currentOsPlatform = os.platform()
|
||||
const osPlatformToBuildCommandMap = {
|
||||
darwin: 'mac',
|
||||
linux: 'linux',
|
||||
win32: 'win'
|
||||
}
|
||||
|
||||
export default function buildUiOnCurrentPlatform() {
|
||||
try {
|
||||
const uiBuildProcess = childProcess.spawnSync(
|
||||
`pnpm run build:${osPlatformToBuildCommandMap[currentOsPlatform]}`,
|
||||
{
|
||||
stdio: ['inherit', 'inherit', 'inherit'],
|
||||
shell: true
|
||||
}
|
||||
)
|
||||
if (uiBuildProcess.error) {
|
||||
throw uiBuildProcess.error
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('error encounter when build ui:')
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
buildUiOnCurrentPlatform()
|
||||
@@ -1,50 +0,0 @@
|
||||
import childProcess from 'node:child_process'
|
||||
import path from 'node:path'
|
||||
import os from 'node:os'
|
||||
import url from 'node:url'
|
||||
|
||||
const currentOsPlatform = os.platform()
|
||||
const osPlatformToBuildCommandMap = {
|
||||
darwin: 'mac',
|
||||
linux: 'linux',
|
||||
win32: 'win'
|
||||
}
|
||||
|
||||
export default function build() {
|
||||
const rawCwd = process.cwd()
|
||||
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
|
||||
|
||||
const sqlitePluginDirPath = path.join(__dirname, '../../sqlite-plugin')
|
||||
process.chdir(sqlitePluginDirPath)
|
||||
try {
|
||||
const sqlitePluginBuildProcess = childProcess.spawnSync('pnpm run build', {
|
||||
stdio: ['inherit', 'inherit', 'inherit'],
|
||||
shell: true
|
||||
})
|
||||
process.chdir(rawCwd)
|
||||
if (sqlitePluginBuildProcess.error) {
|
||||
throw sqlitePluginBuildProcess.error
|
||||
}
|
||||
} catch (error) {
|
||||
process.chdir(rawCwd)
|
||||
console.error('error encounter when build sqlite plugin:')
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
try {
|
||||
const uiBuildProcess = childProcess.spawnSync(
|
||||
`pnpm run build:${osPlatformToBuildCommandMap[currentOsPlatform]}`,
|
||||
{
|
||||
stdio: ['inherit', 'inherit', 'inherit'],
|
||||
shell: true
|
||||
}
|
||||
)
|
||||
if (uiBuildProcess.error) {
|
||||
throw uiBuildProcess.error
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('error encounter when build ui:')
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user