fixes buildscript

pull/64/head 0.3
macniel 2025-10-31 15:16:56 +01:00
parent 517bd2f50b
commit b4e614ec74
3 changed files with 8526 additions and 7985 deletions

View File

@ -1,6 +1,7 @@
import {dest, series, src} from 'gulp'; import {dest, series, src} from 'gulp';
import process from 'node:process'; import process from 'node:process';
import replace from 'gulp-replace'; import replace from 'gulp-replace';
import jsonModify from 'gulp-json-modify';
import {getRandomValues} from 'node:crypto'; import {getRandomValues} from 'node:crypto';
import * as dartSass from 'sass'; import * as dartSass from 'sass';
import gulpSass from 'gulp-sass'; import gulpSass from 'gulp-sass';
@ -95,9 +96,26 @@ function copyAssets() {
} }
function updateManifestFile() { function updateManifestFile() {
return src('dist/system.json') return src('src/system.json')
.pipe(replace('{{VERSION}}', process.env.VERSION)) .pipe(
.pipe(dest('dist/')) jsonModify({
key: "version",
value: process.env.VERSION
})
)
.pipe(
jsonModify({
key: "manifest",
value: "https://git.macniel.online/macniel/foundry-dsa41-game/releases/download/{{VERSION}}/system.json".replace("{{VERSION}}", process.env.VERSION)
})
)
.pipe(
jsonModify({
key: "download",
value: "https://git.macniel.online/macniel/foundry-dsa41-game/releases/download/{{VERSION}}/release.zip".replace("{{VERSION}}", process.env.VERSION)
})
)
.pipe(dest('src/'))
} }
async function prepareDB() { async function prepareDB() {
@ -162,10 +180,10 @@ function buildDB() {
export default series( export default series(
cleanDist, cleanDist,
updateManifestFile,
copySource, copySource,
copyAssets, copyAssets,
buildStyles, buildStyles,
prepareDB, prepareDB,
buildDB, buildDB
updateManifestFile
) )

16480
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -26,6 +26,7 @@
"sass-build": "^1.1.6" "sass-build": "^1.1.6"
}, },
"dependencies": { "dependencies": {
"gulp-cli": "^3.1.0" "gulp-cli": "^3.1.0",
"gulp-json-modify": "^1.0.2"
} }
} }