Skip to content

Commit 3d73833

Browse files
authored
Fix install script versioned asset names (#250)
1 parent 5a033aa commit 3d73833

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/install.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ if ([string]::IsNullOrWhiteSpace($Version)) {
2121
throw "Could not resolve Bomly version."
2222
}
2323

24+
$AssetVersion = $Version -replace "^v", ""
25+
2426
$arch = switch ((Get-CimInstance Win32_OperatingSystem).OSArchitecture) {
2527
{ $_ -match "ARM64" } { "arm64"; break }
2628
default { "amd64" }
2729
}
2830

29-
$archive = "${Binary}_${Version}_windows_${arch}.zip"
31+
$archive = "${Binary}_${AssetVersion}_windows_${arch}.zip"
3032
$baseUrl = "https://github.com/$Repo/releases/download/$Version"
3133
$tmp = New-Item -ItemType Directory -Path ([System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.Guid]::NewGuid()))
3234

scripts/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ if [ -z "$version" ]; then
3333
exit 1
3434
fi
3535

36-
archive="${binary}_${version}_${os}_${arch}.tar.gz"
36+
asset_version="${version#v}"
37+
archive="${binary}_${asset_version}_${os}_${arch}.tar.gz"
3738
base_url="https://github.com/${repo}/releases/download/${version}"
3839
tmpdir="$(mktemp -d)"
3940
trap 'rm -rf "$tmpdir"' EXIT INT TERM

0 commit comments

Comments
 (0)