[EXPAND] [[messages]] messageTitle = "QB Update for GT 2.8 (#681)" messageBody = """ [QB] [DETAILS] details = ["Fixes many Quest Book issues", "Updates QB with changes in GT 2.8"] [DETAILS] """ [[messages]] messageTitle = "Buildscript Refactor (#681)" messageBody = """ [INTERNAL] [DETAILS] details = ["**Important: Buildscript has changed from `npx gulp...` or `gulp...` to `npm run gulp...`**!", "Moves to Node 16 Package Management + Typescript Strict Mode", "New Port QB, Check QB and Fix QB Tasks"] [DETAILS] """ [EXPAND] Co-authored-by: Integer Limit <103940576+IntegerLimit@users.noreply.github.com> Co-authored-by: Ghzdude <44148655+ghzdude@users.noreply.github.com> Co-authored-by: SparkedTheorem <162088357+SparkedTheorem@users.noreply.github.com>
27 lines
568 B
TypeScript
27 lines
568 B
TypeScript
import gulp from "gulp";
|
|
import { checkEnvironmentalVariables } from "#utils/util.ts";
|
|
|
|
const vars = [
|
|
"GITHUB_TOKEN",
|
|
"GITHUB_REPOSITORY",
|
|
"GITHUB_SHA",
|
|
"GITHUB_REF",
|
|
"CURSEFORGE_PROJECT_ID",
|
|
"CURSEFORGE_API_TOKEN",
|
|
"CFCORE_API_TOKEN",
|
|
];
|
|
|
|
/**
|
|
* Check required env. variables for vailidity and cancel
|
|
* the build if something is unset.
|
|
*/
|
|
async function checkEnv() {
|
|
checkEnvironmentalVariables(vars);
|
|
|
|
if (!/.+\/.+/.exec(process.env.GITHUB_REPOSITORY ?? "")) {
|
|
throw new Error("Malformed repository slug.");
|
|
}
|
|
}
|
|
|
|
export default gulp.series(checkEnv);
|