Skip to content

Commit

Permalink
Fetch draft RC releases (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSCahill authored Nov 5, 2024
1 parent 63deb72 commit 6c1e1b6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions extensions/generate-rp-connect-categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports.register = function ({ config }) {
this.once('contentClassified', ({ siteCatalog, contentCatalog }) => {
const redpandaConnect = contentCatalog.getComponents().find(component => component.name === 'redpanda-connect')
if (!redpandaConnect || !redpandaConnect.latest) {
logger.info('Could not find the redpanda-connect component')
logger.warn('Could not find the redpanda-connect component. Skipping category creation.')
return
}

Expand Down Expand Up @@ -116,7 +116,8 @@ module.exports.register = function ({ config }) {
redpandaConnect.latest.asciidoc.attributes.driverSupportData = driverSupportData
redpandaConnect.latest.asciidoc.attributes.cacheSupportData = cacheSupportData

logger.info(`Added Redpanda Connect data to latest Asciidoc object: ${JSON.stringify({ connectCategoriesData, flatComponentsData }, null, 2)}`)
logger.info(`Added Redpanda Connect data to latest Asciidoc object.`)
logger.debug(`${JSON.stringify({ connectCategoriesData, flatComponentsData }, null, 2)}`)
} catch (error) {
logger.error(`Error processing Redpanda Connect files: ${error.message}`)
}
Expand Down
5 changes: 2 additions & 3 deletions extensions/version-fetcher/get-latest-redpanda-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ module.exports = async (github, owner, repo) => {
per_page: 50
});

// Filter valid semver tags, exclude drafts, and sort them to find the highest version
// Filter valid semver tags and sort them to find the highest version
const sortedReleases = releases.data
.filter(release => !release.draft)
.map(release => release.tag_name)
.filter(tag => semver.valid(tag.replace(/^v/, '')))
.sort((a, b) => semver.rcompare(a.replace(/^v/, ''), b.replace(/^v/, '')));

if (sortedReleases.length > 0) {
const latestRedpandaReleaseVersion = sortedReleases.find(tag => !tag.includes('-rc'));
const latestRcReleaseVersion = sortedReleases.find(tag => tag.includes('-rc'));
Expand Down
2 changes: 1 addition & 1 deletion local-antora-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ content:
branches: HEAD
start_paths: [preview/extensions-and-macros, preview/shared]
- url: https://github.com/redpanda-data/docs
branches: [main, v/*, api, 'site-search', '!v-end-of-life/*']
branches: [main, v/*, api, v-WIP/24.3, 'site-search', '!v-end-of-life/*']
- url: https://github.com/redpanda-data/redpanda-labs
branches: main
start_paths: [docs,'*/docs']
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@redpanda-data/docs-extensions-and-macros",
"version": "3.7.3",
"version": "3.7.4",
"description": "Antora extensions and macros developed for Redpanda documentation.",
"keywords": [
"antora",
Expand Down
1 change: 1 addition & 0 deletions preview/extensions-and-macros/modules/ROOT/pages/test.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ The `version fetcher` extension gets the latest version of Redpanda and Redpanda

- `\{full-version}`: {full-version}
- `\{latest-redpanda-version}`: {latest-redpanda-version}
- `\{redpanda-beta-version}`: {redpanda-beta-version}
- `\{latest-release-commit}`: {latest-release-commit}
- `\{latest-console-version}`: {latest-console-version}
- `\{latest-operator-version}`: {latest-operator-version}
Expand Down

0 comments on commit 6c1e1b6

Please sign in to comment.