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

update install docs to always suggest latest LTS #2282

Merged
merged 1 commit into from
Oct 4, 2023
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
18 changes: 14 additions & 4 deletions src/components/InstallTabs/LinuxPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
import { Link } from 'gatsby-plugin-react-i18next';

import React from 'react';
import { graphql, useStaticQuery } from 'gatsby';
import { Link } from 'gatsby-plugin-react-i18next';
import ShellBox from '../../ShellBox';
import '../InstallTabs.scss';

export const PureLinuxPanel = (): JSX.Element => {
const data = useStaticQuery(graphql`
query LatestLTS {
mostRecentLts {
version
}
}
`)
const mostRecentLts = data.mostRecentLts.version;
return (
<div>
<ShellBox>
<span className="install__text__no-select"># Install the latest LTS version (Debian or Ubuntu)</span>
<br />
<span className="install__text__no-select">$</span>
<span className="install-text-command">apt-get install </span>temurin-17-jdk
<span className="install-text-command">apt-get install </span>temurin-{mostRecentLts}-jdk
</ShellBox>
<br />
<ShellBox>
<span className="install__text__no-select"># Install the latest LTS version (CentOS/RHEL/Fedora)</span>
<br />
<span className="install__text__no-select">$</span>
<span className="install-text-command">yum install </span>temurin-17-jdk
<span className="install-text-command">yum install </span>temurin-{mostRecentLts}-jdk
</ShellBox>
<br />
<ShellBox>
<span className="install__text__no-select"># Install the latest LTS version (openSUSE/SLES)</span>
<br />
<span className="install__text__no-select">$</span>
<span className="install-text-command">zypper install </span>temurin-17-jdk
<span className="install-text-command">zypper install </span>temurin-{mostRecentLts}-jdk
</ShellBox>
<Link
className="install__docs-button"
Expand Down
11 changes: 10 additions & 1 deletion src/components/InstallTabs/MacOSPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import React from 'react';
import { graphql, useStaticQuery } from 'gatsby';
import ShellBox from '../../ShellBox';
import '../InstallTabs.scss';

export const PureMacOSPanel = (): JSX.Element => {
const data = useStaticQuery(graphql`
query LatestLTS {
mostRecentLts {
version
}
}
`)
const mostRecentLts = data.mostRecentLts.version;
return (
<div>
<ShellBox>
Expand All @@ -22,7 +31,7 @@ export const PureMacOSPanel = (): JSX.Element => {
<span className="install-text-command">brew install --cask </span>temurin8
<br />
<span className="install__text__no-select">$</span>
<span className="install-text-command">brew install --cask </span>temurin11
<span className="install-text-command">brew install --cask </span>temurin{mostRecentLts}
</ShellBox>
<br />
<br />
Expand Down
15 changes: 12 additions & 3 deletions src/components/InstallTabs/WindowsPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import React from 'react';
import { graphql, useStaticQuery } from 'gatsby';
import ShellBox from '../../ShellBox';
import '../InstallTabs.scss';

export const PureWindowsPanel = (): JSX.Element => {
const data = useStaticQuery(graphql`
query LatestLTS {
mostRecentLts {
version
}
}
`)
const mostRecentLts = data.mostRecentLts.version;
return (
<div>
<ShellBox>
<span className="install__text__no-select"># Install the latest version</span>
<br />
<span className="install__text__no-select">$</span>
<span className="install-text-command">winget install </span>EclipseAdoptium.Temurin.17.JDK
<span className="install-text-command">winget install </span>EclipseAdoptium.Temurin.{mostRecentLts}.JDK
</ShellBox>
<br />
<ShellBox>
Expand All @@ -23,14 +32,14 @@ export const PureWindowsPanel = (): JSX.Element => {
<span className="install__text__no-select"># Upgrade the Winget package</span>
<br />
<span className="install__text__no-select">$</span>
<span className="install-text-command">winget upgrade </span>EclipseAdoptium.Temurin.17.JDK
<span className="install-text-command">winget upgrade </span>EclipseAdoptium.Temurin.{mostRecentLts}.JDK
</ShellBox>
<br />
<ShellBox>
<span className="install__text__no-select"># Uninstall the Winget package</span>
<br />
<span className="install__text__no-select">$</span>
<span className="install-text-command">winget uninstall </span>EclipseAdoptium.Temurin.17.JDK
<span className="install-text-command">winget uninstall </span>EclipseAdoptium.Temurin.{mostRecentLts}.JDK
</ShellBox>
<a
className="install__docs-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ exports[`Tests for InstallTabs component > renders correctly 1`] = `
>
winget install
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<br />
Expand Down Expand Up @@ -160,7 +162,9 @@ exports[`Tests for InstallTabs component > renders correctly 1`] = `
>
winget upgrade
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<br />
Expand Down Expand Up @@ -189,7 +193,9 @@ exports[`Tests for InstallTabs component > renders correctly 1`] = `
>
winget uninstall
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<a
Expand Down Expand Up @@ -319,7 +325,9 @@ exports[`Tests for InstallTabs component > renders correctly for Linux 1`] = `
>
apt-get install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<br />
Expand Down Expand Up @@ -348,7 +356,9 @@ exports[`Tests for InstallTabs component > renders correctly for Linux 1`] = `
>
yum install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<br />
Expand Down Expand Up @@ -377,7 +387,9 @@ exports[`Tests for InstallTabs component > renders correctly for Linux 1`] = `
>
zypper install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<a
Expand Down Expand Up @@ -507,7 +519,9 @@ exports[`Tests for InstallTabs component > renders correctly for Unix 1`] = `
>
apt-get install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<br />
Expand Down Expand Up @@ -536,7 +550,9 @@ exports[`Tests for InstallTabs component > renders correctly for Unix 1`] = `
>
yum install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<br />
Expand Down Expand Up @@ -565,7 +581,9 @@ exports[`Tests for InstallTabs component > renders correctly for Unix 1`] = `
>
zypper install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<a
Expand Down Expand Up @@ -748,7 +766,8 @@ exports[`Tests for InstallTabs component > renders correctly for macOS 1`] = `
>
brew install --cask
</span>
temurin11
temurin
1
</code>
</pre>
<br />
Expand Down Expand Up @@ -911,7 +930,9 @@ exports[`Tests for InstallTabs component > renders correctly for other 1`] = `
>
winget install
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<br />
Expand Down Expand Up @@ -969,7 +990,9 @@ exports[`Tests for InstallTabs component > renders correctly for other 1`] = `
>
winget upgrade
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<br />
Expand Down Expand Up @@ -998,7 +1021,9 @@ exports[`Tests for InstallTabs component > renders correctly for other 1`] = `
>
winget uninstall
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ exports[`Tests for LinuxPanel component > renders correctly 1`] = `
>
apt-get install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<br />
Expand Down Expand Up @@ -57,7 +59,9 @@ exports[`Tests for LinuxPanel component > renders correctly 1`] = `
>
yum install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<br />
Expand Down Expand Up @@ -86,7 +90,9 @@ exports[`Tests for LinuxPanel component > renders correctly 1`] = `
>
zypper install
</span>
temurin-17-jdk
temurin-
1
-jdk
</code>
</pre>
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ exports[`Tests for MacOSPanel component > renders correctly 1`] = `
>
brew install --cask
</span>
temurin11
temurin
1
</code>
</pre>
<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ exports[`Tests for WindowsPanel component > renders correctly 1`] = `
>
winget install
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<br />
Expand Down Expand Up @@ -86,7 +88,9 @@ exports[`Tests for WindowsPanel component > renders correctly 1`] = `
>
winget upgrade
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<br />
Expand Down Expand Up @@ -115,7 +119,9 @@ exports[`Tests for WindowsPanel component > renders correctly 1`] = `
>
winget uninstall
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<a
Expand Down
12 changes: 9 additions & 3 deletions src/templates/__tests__/__snapshots__/asciidoc.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ exports[`Asciidoc pages > renders correctly - installation slug 1`] = `
>
winget install
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<br />
Expand Down Expand Up @@ -184,7 +186,9 @@ exports[`Asciidoc pages > renders correctly - installation slug 1`] = `
>
winget upgrade
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<br />
Expand Down Expand Up @@ -213,7 +217,9 @@ exports[`Asciidoc pages > renders correctly - installation slug 1`] = `
>
winget uninstall
</span>
EclipseAdoptium.Temurin.17.JDK
EclipseAdoptium.Temurin.
1
.JDK
</code>
</pre>
<a
Expand Down