Skip to content

Commit

Permalink
build scripts update
Browse files Browse the repository at this point in the history
  • Loading branch information
drweb86 committed Dec 16, 2024
1 parent 687d8ad commit 954d115
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
3 changes: 1 addition & 2 deletions help/Version History (Changelog).md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# 2024.12.14
(unreleased)
# 2024.12.16

## Bug Fixes
- .Net 9 broken ConcurrentBag component was removed. v.2024.11.27 was crashing.
Expand Down
27 changes: 19 additions & 8 deletions sources/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Write-Output "Changes are $changes"
$ErrorActionPreference = "Stop"

Write-Output "Checking if required repositories are checked out."
$wingetForkFolder=../../winget-pkgs
if (-Not (Test-Path $sevenZipFolder))
$wingetForkFolder="../../winget-pkgs"
if (-Not (Test-Path $wingetForkFolder))
{
Write-Error "Checkout https://github.com/drweb86/winget-pkgs into folder $wingetForkFolder"
Exit 1
Expand Down Expand Up @@ -178,26 +178,37 @@ ForEach ($platform in $platforms)
}

Write-Output "Prepare win-get release"
$wingetReleaseFolder=$wingetForkFolder\manifests\s\SiarheiKuchuk\BUtil\$version
$wingetReleaseDateReplacement = $version -replace '.', '-'
$wingetReleaseFolder="$($wingetForkFolder)\manifests\s\SiarheiKuchuk\BUtil\$($version)"
$wingetReleaseDateReplacement = $version -replace '\.', '-'
$wingetReleaseHashArm64 = Get-FileHash -Path "..\Output\BUtil_v$($version)_win-arm64.exe" -Algorithm SHA256
$wingetReleaseHashX64 = Get-FileHash -Path "..\Output\BUtil_v$($version)_win-x64.exe" -Algorithm SHA256

.\tools\Template-Copy.ps1`
if (Test-Path $wingetReleaseFolder)
{
Remove-Item $wingetReleaseFolder -Confirm:$false -Recurse:$true
if ($LastExitCode -ne 0)
{
Write-Error "Fail."
Exit 1
}
}
md "$($wingetReleaseFolder)"

& ".\tools\Template-Copy.ps1"`
-TemplateFilePath "tools\winget-pkgs\SiarheiKuchuk.BUtil.installer.yaml" `
-DestinationFilePath "$wingetReleaseFolder\SiarheiKuchuk.BUtil.installer.yaml" `
-Replacements @{ 'APP_VERSION' = $version; 'RELEASE_DATE' = $wingetReleaseDateReplacement; 'ARM64_SHA256' = $wingetReleaseHashArm64.Hash; 'X64_SHA256' = $wingetReleaseHashX64.Hash }
.\tools\Template-Copy.ps1`
& ".\tools\Template-Copy.ps1"`
-TemplateFilePath "tools\winget-pkgs\SiarheiKuchuk.BUtil.locale.en-US.yaml" `
-DestinationFilePath "$wingetReleaseFolder\SiarheiKuchuk.BUtil.locale.en-US.yaml" `
-Replacements @{ 'APP_VERSION' = $version; 'RELEASE_DATE' = $wingetReleaseDateReplacement; 'ARM64_SHA256' = $wingetReleaseHashArm64.Hash; 'X64_SHA256' = $wingetReleaseHashX64.Hash }
.\tools\Template-Copy.ps1`
& ".\tools\Template-Copy.ps1"`
-TemplateFilePath "tools\winget-pkgs\SiarheiKuchuk.BUtil.yaml" `
-DestinationFilePath "$wingetReleaseFolder\SiarheiKuchuk.BUtil.yaml" `
-Replacements @{ 'APP_VERSION' = $version; 'RELEASE_DATE' = $wingetReleaseDateReplacement; 'ARM64_SHA256' = $wingetReleaseHashArm64.Hash; 'X64_SHA256' = $wingetReleaseHashX64.Hash }

Write-Output "Prepare ubuntu"
.\tools\Template-Copy.ps1`
& ".\tools\Template-Copy.ps1"`
-TemplateFilePath "tools\ubuntu-install-template.sh" `
-DestinationFilePath "ubuntu-install.sh" `
-Replacements @{ 'APP_VERSION' = $version }
Expand Down
4 changes: 2 additions & 2 deletions sources/ubuntu-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Fail on first error.
set -e

version=2024.11.27
version=2024.12.16

sourceCodeInstallationDirectory=/usr/local/src/butil
binariesInstallationDirectory=/usr/local/butil
Expand Down Expand Up @@ -95,4 +95,4 @@ echo Shortcut on desktop and for quick search are provisioned for UI tool.
echo Console tool: ${binariesInstallationDirectory}/butilc
echo
echo
sleep 2m
sleep 2m

0 comments on commit 954d115

Please sign in to comment.