Skip to content

Commit

Permalink
Fix vagrant linux packages install, fix wget command based on feedback (
Browse files Browse the repository at this point in the history
#2620)

* fix vagrant linux packages install, fix wget command based on feedback

* address situation where linux doesnt exist for previous version of vagrant

* Update src/views/product-downloads-view/index.tsx

Co-authored-by: Heat Hamilton <[email protected]>

* revert extraneous changes

---------

Co-authored-by: Heat Hamilton <[email protected]>
  • Loading branch information
im2nguyen and heatlikeheatwave authored Nov 13, 2024
1 parent d8a2c10 commit 6d661bc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/data/vault.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
{
"label": "Ubuntu/Debian",
"commands": [
"wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg",
"wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg",
"echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list",
"sudo apt-get update && sudo apt-get install vault"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const DownloadsSection = ({
</InlineLink>{' '}
to learn how to install and verify HashiCorp tools on any
Linux distribution, and create a custom Linux container
with verified HashiCorp tools..
with verified HashiCorp tools.
</>
}
icon={<IconInfo16 className={s.cardIcon} />}
Expand Down
4 changes: 2 additions & 2 deletions src/views/product-downloads-view/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const generateDefaultPackageManagers = (
{
label: 'Ubuntu/Debian',
commands: [
`wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg`,
`wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg`,
`echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list`,
`sudo apt update && sudo apt install ${productSlug}`,
],
Expand Down Expand Up @@ -117,7 +117,7 @@ export function generateEnterprisePackageManagers(
{
label: 'Ubuntu/Debian',
commands: [
`wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg`,
`wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg`,
`echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list`,
`sudo apt update && sudo apt install ${productSlug}-enterprise`,
],
Expand Down
11 changes: 10 additions & 1 deletion src/views/product-downloads-view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,20 @@ const ProductDownloadsViewContent = ({

// Group the selected release downloads by OS, for use in multiple places
const selectedRelease = releases.versions[currentVersion]
const downloadsByOS = useMemo(
let downloadsByOS = useMemo(
() => sortPlatforms(selectedRelease),
[selectedRelease]
)

if (currentProduct.slug === 'vagrant') {
downloadsByOS = {
...downloadsByOS,
...(downloadsByOS.linux?.amd64
? { linux: { amd64: downloadsByOS.linux.amd64 } }
: {}),
}
}

// Build download sidebar menu items, which vary with the selected release.
const downloadMenuItems = Object.keys(downloadsByOS).map(
(osKey: string): MenuItem => ({
Expand Down

0 comments on commit 6d661bc

Please sign in to comment.