mirror of
https://github.com/bitwarden/cli
synced 2025-12-10 13:23:35 +00:00
chocolatey assets
This commit is contained in:
26
scripts/choco-pack.ps1
Normal file
26
scripts/choco-pack.ps1
Normal file
@@ -0,0 +1,26 @@
|
||||
# To run:
|
||||
# .\choco-pack.ps1
|
||||
#
|
||||
# and then push to choco with:
|
||||
# cd ..\dist\chocolatey
|
||||
# choco push
|
||||
|
||||
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
|
||||
$rootDir = $dir + "\..";
|
||||
$distDir = $rootDir + "\dist";
|
||||
$chocoDir = $rootDir + "\stores\chocolatey";
|
||||
$distChocoDir = $distDir + "\chocolatey";
|
||||
$distChocoToolsDir = $distDir + "\chocolatey\tools";
|
||||
|
||||
if(Test-Path -Path $distChocoDir) {
|
||||
Remove-Item -Recurse -Force $distChocoDir
|
||||
}
|
||||
|
||||
$exe = $distDir + "\windows\bw.exe";
|
||||
Copy-Item -Path $chocoDir -Destination $distChocoDir –Recurse
|
||||
Copy-Item $exe -Destination $distChocoToolsDir;
|
||||
|
||||
$srcPackage = $rootDir + "\package.json";
|
||||
$srcPackageVersion = (Get-Content -Raw -Path $srcPackage | ConvertFrom-Json).version;
|
||||
$nuspec = $distChocoDir + "\bitwarden-cli.nuspec";
|
||||
choco pack $nuspec --version $srcPackageVersion --out $distChocoDir
|
||||
33
scripts/make-versioninfo.ps1
Normal file
33
scripts/make-versioninfo.ps1
Normal file
@@ -0,0 +1,33 @@
|
||||
$major,$minor,$patch = $env:package_version.split('.')
|
||||
|
||||
$versionInfo = @"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION $major,$minor,$patch,0
|
||||
PRODUCTVERSION $major,$minor,$patch,0
|
||||
FILEOS 0x40004
|
||||
FILETYPE 0x1
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "040904b0"
|
||||
{
|
||||
VALUE "CompanyName", "8bit Solutions LLC"
|
||||
VALUE "ProductName", "Bitwarden"
|
||||
VALUE "FileDescription", "Bitwarden CLI"
|
||||
VALUE "FileVersion", "$env:package_version"
|
||||
VALUE "ProductVersion", "$env:package_version"
|
||||
VALUE "OriginalFilename", "bw.exe"
|
||||
VALUE "InternalName", "bw"
|
||||
VALUE "LegalCopyright", "Copyright 8bit Solutions LLC"
|
||||
}
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0409 0x04B0
|
||||
}
|
||||
}
|
||||
"@
|
||||
|
||||
$versionInfo | Out-File ./version-info.rc
|
||||
Reference in New Issue
Block a user