Skip to content

Commit

Permalink
root: tided up homebrew and chocolatey packagers' implementations
Browse files Browse the repository at this point in the history
It seems there were some dirty executions found for homebrew and
chocolatey packagers in implementations. Hence, we need to tidy
them up for quality assurances. Let's do this.

This patch tides up homebrew and chocolatey packagers' implementations
in root repository.

Co-authored-by: Galyna, Cory <[email protected]>
Co-authored-by: (Holloway) Chew, Kean Ho <[email protected]>
Signed-off-by: (Holloway) Chew, Kean Ho <[email protected]>
  • Loading branch information
hollowaykeanho and corygalyna committed Nov 3, 2023
1 parent 595ec9a commit acb4d7c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions automataCI/_package-homebrew_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function PACKAGE-Run-Homebrew {

# update the formula.rb script
OS-Print-Status info "update given formula.rb file..."
$null = FS-Remove-Silently "${__target_path}.rb"
$null = FS-Remove-Silently "${_target_path}.rb"
foreach ($__line in (Get-Content "${_src}\formula.rb")) {
$__line = STRINGS-Replace-All `
"${__line}" `
Expand All @@ -132,7 +132,7 @@ function PACKAGE-Run-Homebrew {
"{{ TARGET_SHASUM }}" `
"${__shasum}"

$__process = FS-Append-File "${__target_path}.rb" "${__line}"
$__process = FS-Append-File "${_target_path}.rb" "${__line}"
if ($__process -ne 0) {
return 1
}
Expand Down
8 changes: 6 additions & 2 deletions srcRUST/.ci/_package-chocolatey_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,12 @@ if (-not (Test-Path \"\${data_dir}\\\\bin\\\\${PROJECT_SKU}.exe\")) {
# Install
Write-Host \"assembling workspace for installation...\"
Move-Item -Path \"\${data_dir}\\\\bin\" -Destination \"\${root_dir}\"
Move-Item -Path \"\${data_dir}\\\\lib\" -Destination \"\${root_dir}\"
if (Test-Path -PathType Container -Path \"\${data_dir}\\\\bin\") {
Move-Item -Path \"\${data_dir}\\\\bin\" -Destination \"\${root_dir}\"
}
if (Test-Path -PathType Container -Path \"\${data_dir}\\\\lib\") {
Move-Item -Path \"\${data_dir}\\\\lib\" -Destination \"\${root_dir}\"
}
Set-Location \"\$current_dir\"
Remove-Item \$data_dir -Force -Recurse -ErrorAction SilentlyContinue
"
Expand Down
8 changes: 6 additions & 2 deletions srcRUST/.ci/_package-chocolatey_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,12 @@ if (-not (Test-Path "`${data_dir}\bin\${env:PROJECT_SKU}.exe")) {
Write-Host "assembling workspace for installation..."
Move-Item -Path "`${data_dir}\bin" -Destination "`${root_dir}"
Move-Item -Path "`${data_dir}\lib" -Destination "`${root_dir}"
if (Test-Path -PathType Container -Path "`${data_dir}\bin") {
Move-Item -Path "`${data_dir}\bin" -Destination "`${root_dir}"
}
if (Test-Path -PathType Container -Path "`${data_dir}\lib") {
Move-Item -Path "`${data_dir}\lib" -Destination "`${root_dir}"
}
Set-Location "`$current_dir"
Remove-Item `$data_dir -Force -Recurse -ErrorAction SilentlyContinue
"@
Expand Down

0 comments on commit acb4d7c

Please sign in to comment.