Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
- Updated `electrobun` dependency to version `1.18.4-beta.19` in `package.json` and `bun.lock`. - Added `rcedit` and `@tweenjs/tween.js` dependencies to `bun.lock`. - Modified `Jenkinsfile` to clean up additional staging directories for production builds. - Refactored `electrobun.config.ts` to dynamically read the `package.json` path. - Introduced new scripts for managing Hutch installation and execution, improving the build process. - Enhanced artifact finalization logic to support multiple build environments and streamline platform directory resolution.
24 lines
934 B
JavaScript
24 lines
934 B
JavaScript
import { cpSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
|
|
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
|
|
const electrobunDir = path.join(rootDir, 'node_modules/electrobun')
|
|
const rceditSrc = path.join(rootDir, 'node_modules/rcedit')
|
|
const rceditDest = path.join(electrobunDir, 'node_modules/rcedit')
|
|
|
|
if (!existsSync(rceditSrc)) {
|
|
console.error(
|
|
'patch-electrobun-src: rcedit not found. Install it with `bun add -d rcedit`.'
|
|
)
|
|
process.exit(1)
|
|
}
|
|
|
|
mkdirSync(path.join(electrobunDir, 'node_modules'), { recursive: true })
|
|
cpSync(rceditSrc, rceditDest, { recursive: true, force: true })
|
|
|
|
const markerPath = path.join(electrobunDir, '.farmcontrol-electrobun-patched')
|
|
writeFileSync(markerPath, `patched-at=${new Date().toISOString()}\n`)
|
|
|
|
console.log('patch-electrobun-src: rcedit ready for electrobun builds')
|