refactor(lstv2): moved the loc to .env file

This commit is contained in:
2025-07-16 20:24:01 -05:00
parent 6072afc8c0
commit 7539b1653d

View File

@@ -1,11 +1,32 @@
#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
$rootDir = Join-Path $scriptDir ".."
$tmpLoc = Join-Path $scriptDir "\tmp"
$envFile = Join-Path $rootDir ".env"
if (Test-Path $envFile) {
Write-Host "Loading environment variables from $envFile"
Get-Content $envFile | ForEach-Object {
if ($_ -match "^\s*([^#][^=]*)=(.*)$") {
$name = $matches[1].Trim()
$value = $matches[2].Trim()
[System.Environment]::SetEnvironmentVariable($name, $value)
}
}
} else {
Write-Host ".env file not found at $envFile"
}
if (-not $env:LSTV2) {
Write-Warning "BUILD_NAME environment variable is not set. Please make sure you have entered the correct info the env"
exit 1
}
$lstv2Loc = $env:LSTV2
$lstv2BuildsDir = Join-Path $lstv2Loc "builds"
function Build-LstV2-And-Copy {
if (Test-Path $tmpLoc) {