Adds some more polish
This commit is contained in:
parent
b3d0b3a90c
commit
11bd836ec3
18 changed files with 272 additions and 29 deletions
|
|
@ -1,4 +1,14 @@
|
|||
if (!process.env.BUILD_TARGET) {
|
||||
process.env.BUILD_TARGET = "LOCAL";
|
||||
}
|
||||
|
||||
if (!process.env.BUILD_LABEL) {
|
||||
process.env.BUILD_LABEL = "development";
|
||||
}
|
||||
|
||||
import "./create-build-file.mjs";
|
||||
import context from './context.mjs';
|
||||
|
||||
await context.rebuild();
|
||||
await context.dispose();
|
||||
await context.dispose();
|
||||
|
||||
|
|
|
|||
12
build/create-build-file.mjs
Normal file
12
build/create-build-file.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import * as os from "node:os";
|
||||
import * as child_process from "node:child_process";
|
||||
import {json} from "node:stream/consumers";
|
||||
import * as fs from "node:fs";
|
||||
|
||||
const buildContext = {
|
||||
target: process.env.BUILD_TARGET ?? 'LOCAL',
|
||||
commitHash: child_process.execSync("git rev-parse HEAD").toString(),
|
||||
label: process.env.BUILD_LABEL ?? 'development',
|
||||
}
|
||||
|
||||
fs.writeFileSync("./dist/deploy.json", JSON.stringify(buildContext))
|
||||
Loading…
Add table
Add a link
Reference in a new issue