Skip to content

Commit

Permalink
[macOS] Add unxip for macOS13
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathrajsrinivasan committed Nov 6, 2024
1 parent bf6ac0d commit adf6d83
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 3 deletions.
15 changes: 15 additions & 0 deletions images/macos/scripts/build/install-unxip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-unxip.sh
## Desc: Install unxip
################################################################################

source ~/utils/utils.sh

echo "Installing unxip..."
unxip_pkg=$(download_with_retry "https://github.com/saagarjha/unxip/releases/download/v3.1/unxip")
unxip_pkg_sha256="926ecd7bffa201c7b2b8a729fc70fbf228cf624a0e6856c13f935a97fa4fc71a"
use_checksum_comparison $unxip_pkg $unxip_pkg_sha256
install "$unxip_pkg" /usr/local/bin/unxip

invoke_tests "Common" "Unxip"
1 change: 1 addition & 0 deletions images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ if ($os.IsMonterey) {
$utilities.AddToolVersion("Vagrant", $(Get-VagrantVersion))
$utilities.AddToolVersion("VirtualBox", $(Get-VirtualBoxVersion))
}
$utilities.AddToolVersion("Unxip", $(Get-UnxipVersion))
$utilities.AddToolVersion("yq", $(Get-YqVersion))
$utilities.AddToolVersion("zstd", $(Get-ZstdVersion))

Expand Down
5 changes: 5 additions & 0 deletions images/macos/scripts/docs-gen/SoftwareReport.Common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -619,3 +619,8 @@ function Get-XcodesVersion {
$XcodesVersion = Run-Command "xcodes version"
return $XcodesVersion
}

function Get-UnxipVersion {
$unxipVersion = Run-Command "unxip --version" | Take-Part -Part 1
return $unxipVersion
}
6 changes: 6 additions & 0 deletions images/macos/scripts/tests/Common.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,9 @@ Describe "Compiled" -Skip:(-not $os.IsMonterey) {
"sbt -version" | Should -ReturnZeroExitCode
}
}

Describe "Unxip" {
It "Unxip" {
"unxip --version" | Should -ReturnZeroExitCode
}
}
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-13.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ build {
"${path.root}/../scripts/build/install-rubygems.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh"
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-unxip.sh"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-13.arm64.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ build {
"${path.root}/../scripts/build/install-rubygems.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh"
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-unxip.sh"
]
}

Expand Down
1 change: 0 additions & 1 deletion images/macos/toolsets/toolset-13.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"zstd",
"gmp",
"yq",
"unxip",
"xcbeautify",
"xcodes"
],
Expand Down

0 comments on commit adf6d83

Please sign in to comment.