Skip to content

Commit

Permalink
(git.install) use file names directly when installing
Browse files Browse the repository at this point in the history
closes #1351
  • Loading branch information
majkinetor committed Oct 23, 2019
1 parent f7c2a02 commit 44be1a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions automatic/git.install/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ Set-InstallerRegistrySettings $pp

Stop-GitSSHAgent

$fileName32 = 'Git-2.23.0-32-bit.exe'
$fileName64 = 'Git-2.23.0-64-bit.exe'
$packageArgs = @{
PackageName = 'git.install'
FileType = 'exe'
SoftwareName = 'Git version *'
File = Get-Item $toolsPath\*-32-bit.exe
File64 = Get-Item $toolsPath\*-64-bit.exe
File = Get-Item $toolsPath\$fileName32
File64 = Get-Item $toolsPath\$fileName64
SilentArgs = "/VERYSILENT", "/SUPPRESSMSGBOXES", "/NORESTART", "/NOCANCEL", "/SP-", "/LOG", (Get-InstallComponents $pp)
}
Install-ChocolateyInstallPackage @packageArgs
Get-ChildItem $toolsPath\*.exe | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" '' } }
Get-ChildItem $toolsPath\$fileName32, $toolsPath\$fileName64 | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" '' } }

$packageName = $packageArgs.packageName
$installLocation = Get-AppInstallLocation $packageArgs.SoftwareName
Expand Down
5 changes: 5 additions & 0 deletions automatic/git.install/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ $releases = "$domain/git-for-windows/git/releases/latest"
function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix }
function global:au_SearchReplace {
@{
".\tools\chocolateyInstall.ps1" = @{
"(^[$]fileName32\s*=\s*)('.*')" = "`$1'$($Latest.FileName32)'"
"(^[$]fileName64\s*=\s*)('.*')" = "`$1'$($Latest.FileName64)'"
}

".\legal\verification.txt" = @{
"(?i)(32-Bit.+)\<.*\>" = "`${1}<$($Latest.URL32)>"
"(?i)(64-Bit.+)\<.*\>" = "`${1}<$($Latest.URL64)>"
Expand Down

0 comments on commit 44be1a7

Please sign in to comment.