Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove boundary installer for versions less than 0.18.0 #2678

Merged
merged 5 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: MPL-2.0
*/

import { gt } from 'semver'
// Components
import Card from 'components/card'
import CardWithLink from 'views/product-downloads-view/components/card-with-link'
Expand All @@ -21,6 +22,7 @@ import { getFileExtension, humanArch } from '../helpers'
import s from './install-callout.module.css'
import { ContentWithPermalink } from 'views/open-api-docs-view/components/content-with-permalink'
import viewStyles from 'views/product-downloads-view/product-downloads-view.module.css'
import { useCurrentVersion } from 'views/product-downloads-view/contexts'

/**
* Render a callout to download the Boundary Desktop Client.
Expand All @@ -41,7 +43,11 @@ function InstallCallout({
children?: React.ReactNode
}) {
const { latestVersion, builds } = customInstallProps
return (
const { currentVersion } = useCurrentVersion()
// If the boundary version is less than 0.18.0, we don't want to show the installer since
// previous versions of boundary do not work with the installer
return headingData.id === 'installer' &&
gt('0.18.0', currentVersion) ? null : (
<Card elevation="base" className={cardClassName}>
<ContentWithPermalink
className={s.headingContainer}
Expand Down
9 changes: 8 additions & 1 deletion src/views/product-downloads-view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import { ReactElement, useMemo } from 'react'
import { useRouter } from 'next/router'
import Head from 'next/head'
import { gt } from 'semver'

// Global imports
import { useCurrentProduct } from 'contexts'
Expand Down Expand Up @@ -129,6 +130,12 @@ const ProductDownloadsViewContent = ({
},
]
: []
// If the product is boundary and the version is less than 0.18.0, we don't want
// to show the installer since previous boundary versions don't work with the installer
const filteredAdditionalDownloadItems =
currentProduct.slug === 'boundary' && gt('0.18.0', currentVersion)
? additionalDownloadItems.filter((item) => item.fullPath !== '#installer')
: additionalDownloadItems

const sidebarNavDataLevels = [
generateTopLevelSidebarNavData(currentProduct.name),
Expand All @@ -139,7 +146,7 @@ const ProductDownloadsViewContent = ({
{ divider: true },
{ heading: 'Operating Systems' },
...downloadMenuItems,
...additionalDownloadItems,
...filteredAdditionalDownloadItems,
{ divider: true },
{
title: SHARED_HEADINGS.releaseInfo.text,
Expand Down
Loading