From 591e574838fb26fb6368765f8e544c33a752ca4f Mon Sep 17 00:00:00 2001 From: Jeff Escalante Date: Fri, 13 Mar 2020 18:42:56 -0400 Subject: [PATCH] release process improvements (#8564) --- website/README.md | 35 +++++++++++++++++++++++++++++++ website/pages/downloads/index.jsx | 11 ++++++++++ 2 files changed, 46 insertions(+) diff --git a/website/README.md b/website/README.md index 7e96d1cbd..e2fef896e 100644 --- a/website/README.md +++ b/website/README.md @@ -94,6 +94,41 @@ by the appropriate embedded `content` values. - `content` values will be **file names** within their appropriately nested directory. +### Changing the Release Version + +To change the version of Vault displayed for download on the website, head over to `data/version.js` and change the number there. It's important to note that the version number must match a version that has been released and is live on `releases.hashicorp.com` -- if it does not, the website will be unable to fetch links to the binaries and will not compile. So this version number should be changed _only after a release_. + +### Displaying a Prerelease + +If there is a prerelease of any type that should be displayed on the downloads page, this can be done by editing `pages/downloads/index.jsx`. By default, the download component might look something like this: + +```jsx + +``` + +To add a prerelease, an extra `prerelease` property can be added to the component as such: + +```jsx + +``` + +This configuration would display something like the following text on the website, emphasis added to the configurable parameters: + +``` +A {{ release candidate }} for Vault {{ v1.0.0 }} is available! The release can be downloaded here. +``` + +You may customize the parameters in any way you'd like. To remove a prerelease from the website, simply delete the `prerelease` paremeter from the above component. + ## Deployment This website is hosted on Netlify and configured to automatically deploy anytime diff --git a/website/pages/downloads/index.jsx b/website/pages/downloads/index.jsx index 24e5c45c7..e07059c01 100644 --- a/website/pages/downloads/index.jsx +++ b/website/pages/downloads/index.jsx @@ -35,4 +35,15 @@ export async function unstable_getStaticProps() { }, {}) }) .then(r => ({ props: { downloadData: r } })) + .catch(() => { + throw new Error( + `-------------------------------------------------------- + Unable to resolve version ${VERSION} on releases.hashicorp.com from link + . Usually this + means that the specified version has not yet been released. The downloads page + version can only be updated after the new version has been released, to ensure + that it works for all users. + ----------------------------------------------------------` + ) + }) }