diff --git a/bin/generate.js b/bin/generate.js index 502814f0..aa7499bb 100755 --- a/bin/generate.js +++ b/bin/generate.js @@ -308,6 +308,7 @@ const getReplacements = async ({ name, namespace, npm }) => { const newYear = new Date().getFullYear(); // Retrieve Node version defined in package.json const minNodeVersion = pjson.engines.node.replace(/[^0-9,.]+/g,''); + const abstractNodeVersion = minNodeVersion.split('.')[0] + '.x'; if (labs) { npm = `@aurolabs` @@ -325,7 +326,8 @@ const getReplacements = async ({ name, namespace, npm }) => { { regex: /\[year\]/g, value: newYear }, { regex: /\[designTokens\]/g, value: versionData['@aurodesignsystem/design-tokens'] }, { regex: /\[wcss\]/g, value: versionData['@aurodesignsystem/webcorestylesheets'] }, - { regex: /\[nodeVersion\]/g, value: minNodeVersion } + { regex: /\[nodeVersion\]/g, value: minNodeVersion }, + { regex: /\[abstractNodeVersion\]/g, value: abstractNodeVersion } ]; return nameReplacements.concat(pkgReplacements); diff --git a/template/.github/settings.yml b/template/.github/settings.yml index 44265166..8d5bf8fa 100644 --- a/template/.github/settings.yml +++ b/template/.github/settings.yml @@ -59,7 +59,7 @@ branches: # Required. Require branches to be up to date before merging. strict: true # Required. The list of status checks to require in order to merge into this branch - contexts: ["test (16.x)", "license/cla"] + contexts: ["test ([abstractNodeVersion])", "license/cla"] # Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable. enforce_admins: false # Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable. diff --git a/template/.github/settings__labs.yml b/template/.github/settings__labs.yml index febdbb21..2aa90ea6 100644 --- a/template/.github/settings__labs.yml +++ b/template/.github/settings__labs.yml @@ -56,7 +56,7 @@ branches: # Required. Require branches to be up to date before merging. strict: true # Required. The list of status checks to require in order to merge into this branch - contexts: ["test (16.x)"] + contexts: ["test ([abstractNodeVersion])"] # Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable. enforce_admins: false # Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable. diff --git a/template/.github/workflows/testPublish.yml b/template/.github/workflows/testPublish.yml index c804b3cf..5a92ca1a 100644 --- a/template/.github/workflows/testPublish.yml +++ b/template/.github/workflows/testPublish.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [ [abstractNodeVersion] ] steps: - uses: actions/checkout@v2