Skip to content

fix: fix bump release - part 4 #763

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

Merged
merged 16 commits into from
Jun 11, 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
20 changes: 13 additions & 7 deletions .github/scripts/generateSpecMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ const __dirname = path.dirname(__filename);
// Standalone specs can be added directly to the mapping. Any spec that requires displaying a version dropdown
// will need to map its different versions to a separate Bump "branch". For example, a new resource version
// for Atlas Admin API v2 will lead to a new entry in the array with its own Bump branch.
const SPEC_MAPPING = [
{
doc: process.env.ATLAS_ADMIN_V1_DOC_ID,
file: 'v1-deprecated/v1.json',
branch: 'main',
},
];
const SPEC_MAPPING = [];

function handleAdminAPIv1() {
// We release v1-deprecated/v1.json only for the main branch (PROD)
if (process.env.BRANCH_NAME === 'main') {
SPEC_MAPPING.push({
doc: process.env.ATLAS_ADMIN_V1_DOC_ID,
file: 'v1-deprecated/v1.json',
branch: 'main',
});
}
}

function handleAdminAPIv2() {
const docId = process.env.ATLAS_ADMIN_V2_DOC_ID;
Expand Down Expand Up @@ -54,6 +59,7 @@ function handleAdminAPIv2() {
}
}

handleAdminAPIv1();
handleAdminAPIv2();
// Output to GH action
console.log(JSON.stringify(SPEC_MAPPING));
1 change: 1 addition & 0 deletions .github/workflows/generate-bump-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
env:
ATLAS_ADMIN_V1_DOC_ID: ${{ inputs.atlas_admin_v1_doc_id }}
ATLAS_ADMIN_V2_DOC_ID: ${{ inputs.atlas_admin_v2_doc_id }}
BRANCH_NAME: ${{ inputs.branch}}
run: |
spec_mapping=$(node release-scripts/generateSpecMapping.js)
echo "matrix=${spec_mapping}" >> "${GITHUB_OUTPUT}"
Expand Down