fix startup script

This commit is contained in:
2026-05-28 11:01:25 +02:00
parent f459ecf72c
commit 3da8c1eac9
5 changed files with 39 additions and 28 deletions

View File

@@ -19,6 +19,20 @@ if ($? -eq $false){
}
Write-Output "Deleted outstanding artifacts successfully"
Write-Output "Create data folder..."
$pattern = "dopt_nafka_wce-crm_v*"
$data_folder = Join-Path -Path $ENV_PATH -ChildPath 'data'
if (-not (Test-Path -Path $data_folder)){
Write-Output "[PWSH] Data path not existing. Create..."
New-Item -Path $data_folder -ItemType Directory
}
else {
Write-Output "Data path already exists."
}
Write-Output "Building package..."
.\scripts\publish.ps1
if ($? -eq $false){
@@ -56,17 +70,6 @@ if ($? -eq $false){
}
Write-Output "Successfully installed package"
# copy CLI file
# TODO add startup file
# Write-Output "Copying CLI script file..."
# $cli_path = Join-Path -Path $SRC_PATH -ChildPath 'cli.py'
# Copy-Item -Path $cli_path -Destination $PY_PATH -Force
# if ($? -eq $false){
# Write-Output "[PWSH] Exiting script because there were errors while copying the CLI script file"
# Exit
# }
# Write-Output "Copied CLI script file successfully"
# copy database file
Write-Output "Copying database files..."
$copy_file = Join-Path -Path $SRC_PATH -ChildPath 'data/db/wce_grunderfassung.db'
@@ -97,18 +100,12 @@ Write-Output "Copied ENV file successfully"
# copy startup script files
Write-Output "Copying startup scripts..."
$copy_file = Join-Path -Path $SRC_PATH -ChildPath 'scripts/start.*'
$copy_file = Join-Path -Path $SRC_PATH -ChildPath 'scripts/start.bat'
Copy-Item -Path $copy_file -Destination $ENV_PATH -Force
if ($? -eq $false){
Write-Output "[PWSH] Exiting script because there were errors while copying startup scripts"
Exit
}
# $copy_file = Join-Path -Path $SRC_PATH -ChildPath 'data/db/wce_crm.db'
# Copy-Item -Path $copy_file -Destination $dest_file -Force
# if ($? -eq $false){
# Write-Output "[PWSH] Exiting script because there were errors while copying database 'CRM'"
# Exit
# }
Write-Output "Copied startup scripts successfully"