From e7fff2e0a129605991f2e78d6bb22a9c7867b4ea Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Sun, 10 Nov 2024 21:05:59 +0200 Subject: [PATCH 1/9] fix github-actions --- make.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/make.ps1 b/make.ps1 index f43c4f0..9cd15aa 100644 --- a/make.ps1 +++ b/make.ps1 @@ -51,7 +51,8 @@ Function Build-Project { & git submodule update --recursive --init | Out-Host & git submodule update --recursive --remote | Out-Host Get-Content -Path 'use\components.txt' | ForEach-Object { - If ((-not (& lazbuild --verbose-pkgsearch $_ | Out-Null)) -and + If ((-not ([string]::IsNullOrEmpty($_))) -and + (-not (& lazbuild --verbose-pkgsearch $_ | Out-Null)) -and (-not (& lazbuild --add-package $_ | Out-Null)) -and (-not (Test-Path -Path 'use\components.txt'))) { $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip" From 2e294a667e14de2981c64a6bd6cf23a8f3ead57d Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Sun, 10 Nov 2024 21:30:21 +0200 Subject: [PATCH 2/9] fix github-actions --- make.ps1 | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/make.ps1 b/make.ps1 index 9cd15aa..1084b73 100644 --- a/make.ps1 +++ b/make.ps1 @@ -51,14 +51,21 @@ Function Build-Project { & git submodule update --recursive --init | Out-Host & git submodule update --recursive --remote | Out-Host Get-Content -Path 'use\components.txt' | ForEach-Object { - If ((-not ([string]::IsNullOrEmpty($_))) -and - (-not (& lazbuild --verbose-pkgsearch $_ | Out-Null)) -and - (-not (& lazbuild --add-package $_ | Out-Null)) -and - (-not (Test-Path -Path 'use\components.txt'))) { - $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip" - Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force - Remove-Item $OutFile + If ($_) { + Try { + & lazbuild --verbose-pkgsearch $_ | Out-Null + } Catch { + Try { + & lazbuild --add-package $_ | Out-Host + } Catch { + If (-not (Test-Path -Path "use\$($_)")) { + $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip" + Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force + Remove-Item $OutFile + } + } } + } } Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object { & lazbuild --add-package-link $_ | Out-Host From 853d1d23179e26c23f777b06a77416faa456ca13 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Sun, 10 Nov 2024 21:44:25 +0200 Subject: [PATCH 3/9] fix github-actions --- make.ps1 | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/make.ps1 b/make.ps1 index 1084b73..cb12e73 100644 --- a/make.ps1 +++ b/make.ps1 @@ -51,21 +51,13 @@ Function Build-Project { & git submodule update --recursive --init | Out-Host & git submodule update --recursive --remote | Out-Host Get-Content -Path 'use\components.txt' | ForEach-Object { - If ($_) { - Try { - & lazbuild --verbose-pkgsearch $_ | Out-Null - } Catch { - Try { - & lazbuild --add-package $_ | Out-Host - } Catch { - If (-not (Test-Path -Path "use\$($_)")) { - $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip" - Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force - Remove-Item $OutFile - } - } + If ((-not (& lazbuild --verbose-pkgsearch $_)) -and + (-not (& lazbuild --add-package $_)) -and + (-not (Test-Path -Path 'use\components.txt'))) { + $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip" + Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force + Remove-Item $OutFile } - } } Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object { & lazbuild --add-package-link $_ | Out-Host From 3887ca6ee4e9f9b605041b8178bd3b7458a02281 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Sun, 10 Nov 2024 22:21:41 +0200 Subject: [PATCH 4/9] fix github-actions --- make.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make.ps1 b/make.ps1 index cb12e73..e3e5352 100644 --- a/make.ps1 +++ b/make.ps1 @@ -70,7 +70,7 @@ Function Build-Project { Function Switch-Action { $ErrorActionPreference = 'stop' - Set-PSDebug -Strict -Trace 1 + Set-PSDebug -Strict -Trace 2 Invoke-ScriptAnalyzer -EnableExit -Path $PSCommandPath If ($args.count -gt 0) { Switch ($args[0]) { From a69ba9e786585f9e45c3f501d9b9f78644e5ac60 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Mon, 11 Nov 2024 15:30:35 +0200 Subject: [PATCH 5/9] fix github-actions --- make.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/make.ps1 b/make.ps1 index e3e5352..72fd30f 100644 --- a/make.ps1 +++ b/make.ps1 @@ -24,10 +24,10 @@ Function Install-Program { While ($Input.MoveNext()) { Switch ((Split-Path -Path $Input.Current -Leaf).Split('.')[-1]) { 'msi' { - & msiexec /passive /package $Input.Current | Out-Host + & msiexec /passive /package $Input.Current } 'exe' { - & ".\$($Input.Current)" /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | Out-Host + & ".\$($Input.Current)" /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART } } Remove-Item $Input.Current @@ -48,19 +48,19 @@ Function Build-Project { Get-Command $VAR.Cmd } If ( Test-Path -Path 'use\components.txt' ) { - & git submodule update --recursive --init | Out-Host - & git submodule update --recursive --remote | Out-Host + & git submodule update --recursive --init + & git submodule update --recursive --remote Get-Content -Path 'use\components.txt' | ForEach-Object { - If ((-not (& lazbuild --verbose-pkgsearch $_)) -and - (-not (& lazbuild --add-package $_)) -and - (-not (Test-Path -Path 'use\components.txt'))) { + If ((! (& lazbuild --verbose-pkgsearch $_)) && + (! (& lazbuild --add-package $_)) && + (! (Test-Path -Path 'use\components.txt'))) { $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip" Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force Remove-Item $OutFile } } Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object { - & lazbuild --add-package-link $_ | Out-Host + & lazbuild --add-package-link $_ } } Get-ChildItem -Filter '*.lpi' -Recurse -File –Path 'src' | ForEach-Object { From 864be865b3b8dc6e24d6ef14b775fce8b1b2fc55 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Mon, 11 Nov 2024 15:58:43 +0200 Subject: [PATCH 6/9] fix github-actions --- make.ps1 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/make.ps1 b/make.ps1 index 72fd30f..5ffd1a4 100644 --- a/make.ps1 +++ b/make.ps1 @@ -24,10 +24,10 @@ Function Install-Program { While ($Input.MoveNext()) { Switch ((Split-Path -Path $Input.Current -Leaf).Split('.')[-1]) { 'msi' { - & msiexec /passive /package $Input.Current + & msiexec /passive /package $Input.Current | Out-Host } 'exe' { - & ".\$($Input.Current)" /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART + & ".\$($Input.Current)" /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | Out-Host } } Remove-Item $Input.Current @@ -48,8 +48,8 @@ Function Build-Project { Get-Command $VAR.Cmd } If ( Test-Path -Path 'use\components.txt' ) { - & git submodule update --recursive --init - & git submodule update --recursive --remote + & git submodule update --recursive --init | Out-Host + & git submodule update --recursive --remote | Out-Host Get-Content -Path 'use\components.txt' | ForEach-Object { If ((! (& lazbuild --verbose-pkgsearch $_)) && (! (& lazbuild --add-package $_)) && @@ -60,17 +60,19 @@ Function Build-Project { } } Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object { - & lazbuild --add-package-link $_ + & lazbuild --add-package-link $_ | Out-Host } } Get-ChildItem -Filter '*.lpi' -Recurse -File –Path 'src' | ForEach-Object { - & lazbuild --no-write-project --recursive --build-mode=release $_ | Out-Host + If (! (& lazbuild --no-write-project --recursive --build-mode=release $_)) { + throw "Error!" + } } } Function Switch-Action { $ErrorActionPreference = 'stop' - Set-PSDebug -Strict -Trace 2 + Set-PSDebug -Strict -Trace 1 Invoke-ScriptAnalyzer -EnableExit -Path $PSCommandPath If ($args.count -gt 0) { Switch ($args[0]) { From 540a4a725d13843367b79b9ff2b622c260b7453e Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Mon, 11 Nov 2024 16:04:08 +0200 Subject: [PATCH 7/9] fix github-actions --- make.ps1 | 5 ++++- make.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/make.ps1 b/make.ps1 index 5ffd1a4..848a851 100644 --- a/make.ps1 +++ b/make.ps1 @@ -64,7 +64,10 @@ Function Build-Project { } } Get-ChildItem -Filter '*.lpi' -Recurse -File –Path 'src' | ForEach-Object { - If (! (& lazbuild --no-write-project --recursive --build-mode=release $_)) { + If (& lazbuild --no-write-project --recursive --build-mode=release $_) { + $StackTrace | Out-Host + } Else { + $StackTrace | Out-Host throw "Error!" } } diff --git a/make.sh b/make.sh index cb25a36..9c812b2 100644 --- a/make.sh +++ b/make.sh @@ -27,7 +27,7 @@ function priv_lazbuild if [[ -n "${REPLY}" ]] && ! (lazbuild --verbose-pkgsearch "${REPLY}") && ! (lazbuild --add-package "${REPLY}") && - ! [[ -f "use/${REPLY}" ]]; then + ! [[ -e "use/${REPLY}" ]]; then declare -A VAR=( [url]="https://packages.lazarus-ide.org/${REPLY}.zip" [out]=$(mktemp) From 1bf3f351229d475e4790ee68983542c63f4a1f86 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Mon, 11 Nov 2024 16:09:32 +0200 Subject: [PATCH 8/9] fix github-actions --- make.ps1 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/make.ps1 b/make.ps1 index 848a851..fcc46e7 100644 --- a/make.ps1 +++ b/make.ps1 @@ -64,10 +64,7 @@ Function Build-Project { } } Get-ChildItem -Filter '*.lpi' -Recurse -File –Path 'src' | ForEach-Object { - If (& lazbuild --no-write-project --recursive --build-mode=release $_) { - $StackTrace | Out-Host - } Else { - $StackTrace | Out-Host + If (! (& lazbuild --no-write-project --recursive --build-mode=release $_)) { throw "Error!" } } @@ -92,4 +89,4 @@ Function Switch-Action { } ############################################################################################################## -Switch-Action @args | Out-Null +Switch-Action @args From 79c3f84321712300b1dc8547018a8ec6959638b5 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Mon, 11 Nov 2024 16:16:15 +0200 Subject: [PATCH 9/9] fix github-actions --- make.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/make.ps1 b/make.ps1 index fcc46e7..4e7c092 100644 --- a/make.ps1 +++ b/make.ps1 @@ -64,9 +64,7 @@ Function Build-Project { } } Get-ChildItem -Filter '*.lpi' -Recurse -File –Path 'src' | ForEach-Object { - If (! (& lazbuild --no-write-project --recursive --build-mode=release $_)) { - throw "Error!" - } + & lazbuild --no-write-project --recursive --build-mode=release $_ | Out-Host } }