mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
add registries.json and use real marketplace name
This commit is contained in:
committed by
Aiden McClelland
parent
798e17f636
commit
94a6cd4ff6
20
frontend/build-config.js
Executable file
20
frontend/build-config.js
Executable file
@@ -0,0 +1,20 @@
|
||||
// @ts-check
|
||||
const fs = require('fs')
|
||||
const childProcess = require('child_process')
|
||||
const { env } = require('process')
|
||||
|
||||
const gitHash = String(
|
||||
childProcess.execSync('git describe --always --abbrev=40 --dirty=-modified'),
|
||||
).trim()
|
||||
|
||||
const origConfig = require('./config.json')
|
||||
|
||||
const registries = require('./registries.json')
|
||||
|
||||
origConfig['gitHash'] = gitHash
|
||||
if (/(^|-)beta($|-)/.test(env['ENVIRONMENT'] || '')) {
|
||||
origConfig.ui['marketplace'] = registries.beta
|
||||
} else {
|
||||
origConfig.ui['marketplace'] = registries.prod
|
||||
}
|
||||
fs.writeFileSync('./config.json', JSON.stringify(origConfig, null, 2))
|
||||
Reference in New Issue
Block a user