-
Notifications
You must be signed in to change notification settings - Fork 373
/
chocolateyInstall.ps1
26 lines (23 loc) · 1.25 KB
/
chocolateyInstall.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$ErrorActionPreference = 'Stop'
# Check if Sourcetree standard (with Squirrel installer) is installed
[array] $key = Get-UninstallRegistryKey "sourcetree" | Where-Object { -Not ($_.WindowsInstaller) }
if ($key.Count -gt 0) {
Write-Warning "Found installation of standard version of Sourcetree."
Write-Warning "This package will install the enterprise version of Sourcetree."
Write-Warning "Both applications can be installed side-by-side. Settings won't be migrated from the existing installation. If you no longer want the standard version installed you can uninstall it from Windows control panel."
}
# Install Sourcetree Enterprise
$packageArgs = @{
packageName = $env:ChocolateyPackageName
softwareName = 'Sourcetree*'
fileType = 'msi'
silentArgs = "/qn /norestart ACCEPTEULA=1 /l*v `"$env:TEMP\$env:ChocolateyPackageName.$env:ChocolateyPackageVersion.log`""
validExitCodes= @(0,1641,3010)
url = 'https://product-downloads.atlassian.com/software/sourcetree/windows/ga/SourcetreeEnterpriseSetup_3.0.17.msi'
checksum = '890b08f6291e0676737c4e8466cff7a0823cf79e192114a25a9369270e9ab15f'
checksumType = 'sha256'
url64bit = ''
checksum64 = ''
checksumType64= 'sha256'
}
Install-ChocolateyPackage @packageArgs