Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SM-1130] - add install scripts #645

Merged
merged 22 commits into from
Jun 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b39cc93
add install scripts
tangowithfoxtrot Mar 1, 2024
9d72a15
Merge branch 'main' into sm/SM-1130/host-a-generic-install-script
tangowithfoxtrot Jun 5, 2024
25464c8
fix arm arch and fmt error
tangowithfoxtrot Jun 6, 2024
51f1fc8
allow overriding bws version; use Bitwarden for path name
tangowithfoxtrot Jun 6, 2024
c798283
update to 0.5.0
tangowithfoxtrot Jun 6, 2024
276beef
fix erroneous newline
tangowithfoxtrot Jun 6, 2024
1e4a441
add checksum validation
tangowithfoxtrot Jun 6, 2024
3160a61
Merge branch 'main' into sm/SM-1130/host-a-generic-install-script
tangowithfoxtrot Jun 6, 2024
83f53d3
rm todo; grammar
tangowithfoxtrot Jun 6, 2024
f16cf6d
fix macOS arch check; quote vars
tangowithfoxtrot Jun 6, 2024
34e840e
fix macOS arm arch; quote vars
tangowithfoxtrot Jun 6, 2024
a3ff347
Merge branch 'sm/SM-1130/host-a-generic-install-script' of https://gi…
tangowithfoxtrot Jun 11, 2024
c236af2
use PS-friendly names
tangowithfoxtrot Jun 11, 2024
4aa9bc2
add version bumps for install scripts
tangowithfoxtrot Jun 11, 2024
c0e67ba
Merge branch 'main' into sm/SM-1130/host-a-generic-install-script
tangowithfoxtrot Jun 11, 2024
b6e0b3f
fix: match correct checksum for arch
tangowithfoxtrot Jun 12, 2024
0dd2fda
fix: checksum validation for macs without coreutils
tangowithfoxtrot Jun 13, 2024
0c3b568
move to scripts dir
tangowithfoxtrot Jun 14, 2024
24e0e98
add uninstallation arg
tangowithfoxtrot Jun 17, 2024
2dba059
use easier regex matching
tangowithfoxtrot Jun 17, 2024
035ca93
mention install script in docs
tangowithfoxtrot Jun 20, 2024
3ff5cde
Merge branch 'main' into sm/SM-1130/host-a-generic-install-script
tangowithfoxtrot Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use PS-friendly names
  • Loading branch information
tangowithfoxtrot committed Jun 11, 2024
commit c236af2139a1331e4bb79dafdf420a6fbf008ec0
7 changes: 3 additions & 4 deletions crates/bws/install.ps1
Original file line number Diff line number Diff line change
@@ -33,16 +33,15 @@ function Invoke-BwsDownload {
return $outputPath
}

function Validate-Checksum {
function Test-Checksum {
param($zipPath)
Write-Host "Validating checksum..."

$checksumUrl = "https://github.com/bitwarden/sdk/releases/download/bws-v$bwsVersion/bws-sha256-checksums-$bwsVersion.txt"
$checksumFile = Join-Path $env:TEMP "bws-checksums.txt"
Invoke-WebRequest -Uri $checksumUrl -OutFile $checksumFile

$expectedChecksum = (Get-Content $checksumFile | Where-Object { $_ -match "bws-(.*?)-pc-windows-msvc-$bwsVersion.zip" }).Split(" ")[0]

$actualChecksum = (Get-FileHash -Algorithm SHA256 -Path $zipPath).Hash

if ($actualChecksum -ne $expectedChecksum) {
@@ -75,7 +74,7 @@ function Test-Bws {

Test-BwsInstallation
$zipPath = Invoke-BwsDownload
Validate-Checksum -zipPath $zipPath
Test-Checksum -zipPath $zipPath
Install-Bws -zipPath $zipPath
Test-Bws