Skip to content

Commit

Permalink
[Ubuntu] Remove hub utility (#8363)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpolikarpov-akvelon authored Sep 26, 2023
1 parent 9f764f7 commit 8cb738b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -291,4 +286,4 @@ function Get-ZstdVersion {
function Get-YqVersion {
$yqVersion = $(yq -V) | Take-OutputPart -Part 3
return $yqVersion.TrimStart("v").Trim()
}
}
10 changes: 1 addition & 9 deletions images/linux/scripts/installers/git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
invoke_tests "Tools" "Git"
6 changes: 1 addition & 5 deletions images/linux/scripts/tests/CLI.Tools.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -57,4 +53,4 @@ Describe "Oras CLI" {
It "Oras CLI" {
"oras version" | Should -ReturnZeroExitCode
}
}
}
4 changes: 0 additions & 4 deletions images/linux/scripts/tests/Tools.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,6 @@ Describe "Git" {
It "git-ftp" {
"git-ftp --version" | Should -ReturnZeroExitCode
}

It "hub-cli" {
"hub --version" | Should -ReturnZeroExitCode
}
}

Describe "Heroku" {
Expand Down

0 comments on commit 8cb738b

Please sign in to comment.