build(build): linked everything together
This commit is contained in:
82
package.json
82
package.json
@@ -1,44 +1,44 @@
|
||||
{
|
||||
"name": "logistics_support_tool",
|
||||
"version": "0.0.2-alpha.7",
|
||||
"description": "This is the new logisitcs support tool",
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"backend": "cd backend && go run .",
|
||||
"build": "powershell -File ./scripts/build.ps1",
|
||||
"docker:front": "docker build -t logistics_support_tool:frontend-latest -f frontend/Dockerfile ./frontend",
|
||||
"docker:back": "docker build -t logistics_support_tool:backend-latest -f backend/Dockerfile ./backend",
|
||||
"docker": "powershell -File ./scripts/dockerBuild.ps1",
|
||||
"release:createZip": "powershell -File ./scripts/release.ps1",
|
||||
"release:gitea": "node ./scripts/create-gitea-release.js",
|
||||
"release": "release-it --verbose --preRelease=alpha",
|
||||
"commit": "cz"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.tuffraid.net/cowch/logistics_support_tool.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@release-it/conventional-changelog": "^10.0.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"release-it": "^19.0.3",
|
||||
"standard-version": "^9.5.0"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
"name": "logistics_support_tool",
|
||||
"version": "0.0.2-alpha.7",
|
||||
"description": "This is the new logisitcs support tool",
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"backend": "cd backend && go run .",
|
||||
"build": "powershell -File ./scripts/build.ps1",
|
||||
"docker:front": "docker build -t logistics_support_tool:frontend-latest -f frontend/Dockerfile ./frontend",
|
||||
"docker:back": "docker build -t logistics_support_tool:backend-latest -f backend/Dockerfile ./backend",
|
||||
"docker": "powershell -File ./scripts/dockerBuild.ps1",
|
||||
"release:createZip": "powershell -File ./scripts/release.ps1",
|
||||
"release:gitea": "node ./scripts/create-gitea-release.js",
|
||||
"release": "release-it --verbose --non-interactive --preRelease=alpha",
|
||||
"commit": "cz"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.tuffraid.net/cowch/logistics_support_tool.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@release-it/conventional-changelog": "^10.0.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"release-it": "^19.0.3",
|
||||
"standard-version": "^9.5.0"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"conventional-changelog": "^7.1.1",
|
||||
"dotenv": "^17.2.0",
|
||||
"fs-extra": "^11.3.0",
|
||||
"node-fetch": "^3.3.2"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"conventional-changelog": "^7.1.1",
|
||||
"dotenv": "^17.2.0",
|
||||
"fs-extra": "^11.3.0",
|
||||
"node-fetch": "^3.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ while ($true) {
|
||||
|
||||
Pop-Location
|
||||
npm run release:createZip
|
||||
npm run release
|
||||
Update-BuildNumber
|
||||
break
|
||||
}
|
||||
@@ -125,6 +126,7 @@ while ($true) {
|
||||
Write-Host "Fronend build finished successfully."
|
||||
Pop-Location
|
||||
npm run release:createZip
|
||||
npm run release
|
||||
Update-BuildNumber
|
||||
break
|
||||
}
|
||||
@@ -145,6 +147,7 @@ while ($true) {
|
||||
Push-Location $rootDir/frontend
|
||||
Write-Host "Building the frontend"
|
||||
npm run build
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Warning "Fronend build failed!"
|
||||
Pop-Location
|
||||
@@ -154,6 +157,7 @@ while ($true) {
|
||||
Write-Host "Fronend build finished successfully."
|
||||
Pop-Location
|
||||
npm run release:createZip
|
||||
npm run release
|
||||
Update-BuildNumber
|
||||
|
||||
break
|
||||
|
||||
@@ -33,12 +33,13 @@ try {
|
||||
rawBuild = (await fs.readFile(buildNumberPath, "utf8")).trim();
|
||||
console.log("Raw build", rawBuild);
|
||||
if (rawBuild) {
|
||||
const [numPart, namePart] = rawBuild.split("-");
|
||||
const num = parseInt(numPart, 10);
|
||||
// const [numPart, namePart] = rawBuild.split("-");
|
||||
// const num = parseInt(numPart, 10);
|
||||
|
||||
if (!isNaN(num) && namePart) {
|
||||
buildNumber = `${num - 1}-${namePart}`;
|
||||
}
|
||||
// if (!isNaN(num) && namePart) {
|
||||
// buildNumber = `${num - 1}-${namePart}`;
|
||||
// }
|
||||
buildNumber = rawBuild;
|
||||
}
|
||||
} catch {
|
||||
console.warn("BUILD_NUMBER file not found, defaulting to 0");
|
||||
|
||||
Reference in New Issue
Block a user