4 Commits

7 changed files with 98 additions and 4 deletions

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ releases/
LstWrapper/bin LstWrapper/bin
LstWrapper/publish LstWrapper/publish
LstWrapper/obj LstWrapper/obj
scripts/tmp
# ---> Go # ---> Go
# If you prefer the allow list template instead of the deny list, see community template: # If you prefer the allow list template instead of the deny list, see community template:

View File

@@ -3,6 +3,17 @@
All notable changes to LST will be documented in this file. All notable changes to LST will be documented in this file.
## [0.0.1-alpha.4](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.1-alpha.3...v0.0.1-alpha.4) (2025-07-16)
### 📈 Project changes
* **build:** changes to ignore the tmp folder in the scripts ([26b018e](https://git.tuffraid.net/cowch/logistics_support_tool/commit/26b018ee3eb408ab3c5ddd9e886987deb3334720))
* **createzip:** changes to include the script folder ([5cb71e5](https://git.tuffraid.net/cowch/logistics_support_tool/commit/5cb71e55476f91a48d095f80be2cea3b6793f8e6))
### 📈 Project Builds
* **build:** script created to build lstv2 and copy over before zipping up also cleanup ([c0d67c2](https://git.tuffraid.net/cowch/logistics_support_tool/commit/c0d67c2a16695e40af7ec52f86fc54344f3b889c))
## [0.0.1-alpha.3](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.1-alpha.2...v0.0.1-alpha.3) (2025-07-16) ## [0.0.1-alpha.3](https://git.tuffraid.net/cowch/logistics_support_tool/compare/v0.0.1-alpha.2...v0.0.1-alpha.3) (2025-07-16)
### 🌟 Enhancements ### 🌟 Enhancements

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "logistics_support_tool", "name": "logistics_support_tool",
"version": "0.0.1-alpha.3", "version": "0.0.1-alpha.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "logistics_support_tool", "name": "logistics_support_tool",
"version": "0.0.1-alpha.3", "version": "0.0.1-alpha.4",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"dotenv": "^17.2.0", "dotenv": "^17.2.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "logistics_support_tool", "name": "logistics_support_tool",
"version": "0.0.1-alpha.3", "version": "0.0.1-alpha.4",
"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",

View File

@@ -3,6 +3,12 @@ $rootDir = Join-Path $scriptDir ".."
$releaseScript = Join-Path $scriptDir "release.ps1" $releaseScript = Join-Path $scriptDir "release.ps1"
$packageJsonPath = Join-Path $rootDir "package.json" $packageJsonPath = Join-Path $rootDir "package.json"
# tmp scripts to get lstv2 into this build and zipped up with everything
. (Join-Path $PSScriptRoot "lstV2Build.ps1")
# will run the lstv2 build first so we know for sure its copied over
Build-LstV2-And-Copy
# Path to BUILD_NUMBER file, assuming root is one level up from scripts # Path to BUILD_NUMBER file, assuming root is one level up from scripts
$buildNumberFile = Join-Path $scriptDir "..\BUILD_NUMBER" $buildNumberFile = Join-Path $scriptDir "..\BUILD_NUMBER"
$envFile = Join-Path $rootDir ".env" $envFile = Join-Path $rootDir ".env"
@@ -139,6 +145,9 @@ try {
# 5. Create Gitea release via our script # 5. Create Gitea release via our script
npm run release npm run release
# deleteing the temp folder so we always cleaned up
Delete-Tmp-Folder
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
throw "Failed to create Gitea release" throw "Failed to create Gitea release"
} }
@@ -146,6 +155,9 @@ try {
} }
} catch { } catch {
Write-Warning "Release process failed: $_" Write-Warning "Release process failed: $_"
# deleteing the temp folder so we always cleaned up
Delete-Tmp-Folder
exit 1 exit 1
} }

View File

@@ -79,7 +79,10 @@ $filesToCopy = @(
@{ Source = "frontend\public"; Destination = "frontend\public" }, @{ Source = "frontend\public"; Destination = "frontend\public" },
@{ Source = "package.json"; Destination = "package.json" }, @{ Source = "package.json"; Destination = "package.json" },
@{ Source = "CHANGELOG.md"; Destination = "CHANGELOG.md" }, @{ Source = "CHANGELOG.md"; Destination = "CHANGELOG.md" },
@{ Source = "README.md"; Destination = "README.md" } @{ Source = "README.md"; Destination = "README.md" },
# scripts to be copied over
@{ Source = "scripts\tmp"; Destination = "scripts\tmp" }
@{ Source = "scripts\iisControls.ps1"; Destination = "scripts\iisControls.ps1" }
) )
foreach ($file in $filesToCopy) { foreach ($file in $filesToCopy) {

67
scripts/lstV2Build.ps1 Normal file
View File

@@ -0,0 +1,67 @@
#This is only temp until we make the entire transtion over to just this app...... long time but working on build process
$lstv2Loc = "C:\Users\matthes01\Documents\lstV2"
$lstv2BuildsDir = Join-Path $lstv2Loc "builds"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
$tmpLoc = Join-Path $scriptDir "\tmp"
function Build-LstV2-And-Copy {
if (Test-Path $tmpLoc) {
Write-Host "Temp folder for lst builds exist, moving to run the build function."
} else {
Write-Host "Tmp Folder dose not exist we will create it."
New-Item -Path $scriptDir -Name "tmp" -ItemType "Directory"
}
Write-Host "Jumping into lstV2 to build it."
Push-Location $lstv2Loc
npm run build
Write-Host "LSTV2 Finished building."
Write-Host "Copy the latest build to the tmpLoc"
# Get all build files and sort by creation time
$buildFiles = Get-ChildItem -Path $lstv2BuildsDir -File -Filter "*.zip" |
Sort-Object LastWriteTime -Descending
if ($buildFiles.Count -eq 0) {
Write-Error "No build files found in $lstv2BuildsDir"
Pop-Location
exit 1
}
# Get the most recent build
$latestBuild = $buildFiles[0]
$destinationPath = Join-Path $tmpLoc $latestBuild.Name
Write-Host "Copying latest build: $($latestBuild.Name)"
Write-Host "Created: $($latestBuild.LastWriteTime)"
Write-Host "Size: $([math]::Round($latestBuild.Length/1MB, 2)) MB"
# Copy the file
try {
Copy-Item -Path $latestBuild.FullName -Destination $destinationPath -Force
Write-Host "Successfully copied to: $destinationPath"
}
catch {
Write-Error "Failed to copy build file: $_"
Pop-Location
exit 1
}
Pop-Location
}
function Delete-Tmp-Folder
{
Write-Host "Removing the temp folder to keep it all clean"
if (Test-Path $tmpLoc) {
Remove-Item -Path $tmpLoc -Recurse
}else {
Write-Host "Tmp folder dose not exist, nothing to delete."
}
}