Skip to content

Commit

Permalink
feat(core): link to specific version changelog
Browse files Browse the repository at this point in the history
Since [this change](spinnaker/buildtool#48) to spinnaker/buildtool, the OSS release changelog gists have been published with one top-level gist per minor release and individual files for each patch release. Since we can now stably link to each patch release changelog on spinnaker.io, let's point the Help --> Version link there rather than the general Releases page, which just links out ot each individual changelog anyway.
  • Loading branch information
maggieneterval committed Jun 15, 2020
1 parent 79a9c7a commit 3e4a9a6
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions app/scripts/modules/core/src/help/HelpMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ const AdditionalHelpLinks = () =>
</>
) : null;

const Version = () => {
if (!SETTINGS.version) {
return null;
}

const CHANGELOG_PATH = `${SETTINGS.version.replace(/\./g, '-')}-changelog`;
const CHANGELOG_URL = `${VERSIONS_URL}${CHANGELOG_PATH}`;

return (
<MenuItem href={CHANGELOG_URL} target="_blank">
Spinnaker {SETTINGS.version}
</MenuItem>
);
};

export const HelpMenu = () => {
return (
<li className="help-menu">
Expand All @@ -51,11 +66,7 @@ export const HelpMenu = () => {
<MenuItem href={COMMUNITY_URL} target="_blank">
Community Resources
</MenuItem>
{SETTINGS.version && (
<MenuItem href={VERSIONS_URL} target="_blank">
Spinnaker {SETTINGS.version}
</MenuItem>
)}
<Version />
{SETTINGS.feature.pagerDuty && (
<li role="presentation">
<UISref to="home.page">
Expand All @@ -81,11 +92,7 @@ export const HelpMenu = () => {
<MenuItem href={COMMUNITY_URL} target="_blank">
Community Resources
</MenuItem>
{SETTINGS.version && (
<MenuItem href={VERSIONS_URL} target="_blank">
Spinnaker {SETTINGS.version}
</MenuItem>
)}
<Version />
{SETTINGS.feature.pagerDuty && (
<li role="presentation">
<UISref to="home.page">
Expand Down

0 comments on commit 3e4a9a6

Please sign in to comment.