From 92d50938d29b3c7d15f7308c416c4c9c27a273d5 Mon Sep 17 00:00:00 2001 From: Vasilii Polikarpov Date: Fri, 22 Sep 2023 12:30:05 +0200 Subject: [PATCH] [Ubuntu] Remove hub utility --- .../SoftwareReport/SoftwareReport.Generator.ps1 | 1 - .../scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 7 +------ images/linux/scripts/installers/git.sh | 10 +--------- images/linux/scripts/tests/CLI.Tools.Tests.ps1 | 6 +----- images/linux/scripts/tests/Tools.Tests.ps1 | 4 ---- 5 files changed, 3 insertions(+), 25 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index e4fef5d1cd6f..e9e6747fe47b 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -159,7 +159,6 @@ $cliTools.AddToolVersion("Azure CLI", $(Get-AzureCliVersion)) $cliTools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion)) $cliTools.AddToolVersion("GitHub CLI", $(Get-GitHubCliVersion)) $cliTools.AddToolVersion("Google Cloud CLI", $(Get-GoogleCloudCLIVersion)) -$cliTools.AddToolVersion("Hub CLI", $(Get-HubCliVersion)) $cliTools.AddToolVersion("Netlify CLI", $(Get-NetlifyCliVersion)) $cliTools.AddToolVersion("OpenShift CLI", $(Get-OCCliVersion)) $cliTools.AddToolVersion("ORAS CLI", $(Get-ORASCliVersion)) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 594aeeb6bf0a..3f8882481ea7 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -234,11 +234,6 @@ function Get-FastlaneVersion { return $fastlaneVersion } -function Get-HubCliVersion { - $hubVersion = hub --version | Select-String "hub version" | Take-OutputPart -Part 2 - return $hubVersion -} - function Get-GitHubCliVersion { $ghVersion = gh --version | Select-String "gh version" | Take-OutputPart -Part 2 return $ghVersion @@ -291,4 +286,4 @@ function Get-ZstdVersion { function Get-YqVersion { $yqVersion = $(yq -V) | Take-OutputPart -Part 3 return $yqVersion.TrimStart("v").Trim() -} \ No newline at end of file +} diff --git a/images/linux/scripts/installers/git.sh b/images/linux/scripts/installers/git.sh index b02e020c3ecc..e6f80ef5b769 100644 --- a/images/linux/scripts/installers/git.sh +++ b/images/linux/scripts/installers/git.sh @@ -36,16 +36,8 @@ rm /etc/apt/sources.list.d/github_git-lfs.list echo "git-core $GIT_REPO" >> $HELPER_SCRIPTS/apt-sources.txt echo "git-lfs $GIT_LFS_REPO" >> $HELPER_SCRIPTS/apt-sources.txt -#Install hub -tmp_hub="/tmp/hub" -mkdir -p "$tmp_hub" -downloadUrl=$(get_github_package_download_url "github/hub" "contains(\"hub-linux-amd64\")") -download_with_retries "$downloadUrl" "$tmp_hub" -tar xzf "$tmp_hub"/hub-linux-amd64-*.tgz --strip-components 1 -C "$tmp_hub" -mv "$tmp_hub"/bin/hub /usr/local/bin - # Add well-known SSH host keys to known_hosts ssh-keyscan -t rsa,ecdsa,ed25519 github.com >> /etc/ssh/ssh_known_hosts ssh-keyscan -t rsa ssh.dev.azure.com >> /etc/ssh/ssh_known_hosts -invoke_tests "Tools" "Git" \ No newline at end of file +invoke_tests "Tools" "Git" diff --git a/images/linux/scripts/tests/CLI.Tools.Tests.ps1 b/images/linux/scripts/tests/CLI.Tools.Tests.ps1 index 2f6ecdfd5723..2cd42df7b97b 100644 --- a/images/linux/scripts/tests/CLI.Tools.Tests.ps1 +++ b/images/linux/scripts/tests/CLI.Tools.Tests.ps1 @@ -35,10 +35,6 @@ Describe "GitHub CLI" { It "gh cli" { "gh --version" | Should -ReturnZeroExitCode } - - It "hub is installed" { - "hub --version" | Should -ReturnZeroExitCode - } } Describe "Google Cloud CLI" { @@ -57,4 +53,4 @@ Describe "Oras CLI" { It "Oras CLI" { "oras version" | Should -ReturnZeroExitCode } -} \ No newline at end of file +} diff --git a/images/linux/scripts/tests/Tools.Tests.ps1 b/images/linux/scripts/tests/Tools.Tests.ps1 index aa6cc8f47d46..396eed4b1fe6 100644 --- a/images/linux/scripts/tests/Tools.Tests.ps1 +++ b/images/linux/scripts/tests/Tools.Tests.ps1 @@ -248,10 +248,6 @@ Describe "Git" { It "git-ftp" { "git-ftp --version" | Should -ReturnZeroExitCode } - - It "hub-cli" { - "hub --version" | Should -ReturnZeroExitCode - } } Describe "Heroku" {