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