[Ubuntu] Rework Git installation to avoid using apt repo (#3095)

* rework git installation

* simplify git installation

* minor fix

* document source repo's

* small fix

* debug
This commit is contained in:
Dibir Magomedsaygitov
2021-04-09 11:57:40 +03:00
committed by GitHub
parent fbcc41275b
commit d1de678b65
2 changed files with 18 additions and 5 deletions

View File

@@ -78,13 +78,15 @@ function Get-DockerBuildxVersion {
function Get-GitVersion {
$result = Get-CommandResult "git --version"
$gitVersion = $result.Output | Take-OutputPart -Part 2
return "Git $gitVersion"
$aptSourceRepo = Get-AptSourceRepository -PackageName "git-core"
return "Git $gitVersion (apt source repository: $aptSourceRepo)"
}
function Get-GitLFSVersion {
$result = Get-CommandResult "git-lfs --version"
$gitlfsversion = $result.Output | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
return "Git LFS $gitlfsversion"
$aptSourceRepo = Get-AptSourceRepository -PackageName "git-lfs"
return "Git LFS $gitlfsversion (apt source repository: $aptSourceRepo)"
}
function Get-GitFTPVersion {