Skip to content

Commit 8fd2b98

Browse files
committed
change VERSION to more specific DOCS_VERSION
1 parent 9b5b81f commit 8fd2b98

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/link-check-dotcom.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ jobs:
5353
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
5454
name: 'Link check: Dotcom'
5555
env:
56-
VERSION: 'dotcom'
56+
DOCS_VERSION: 'dotcom'
5757
run: npm run link-check

.github/workflows/link-check-ghae.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ jobs:
5353
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
5454
name: 'Link check: GitHub AE'
5555
env:
56-
VERSION: 'github-ae'
56+
DOCS_VERSION: 'github-ae'
5757
run: npm run link-check

.github/workflows/link-check-ghes.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ jobs:
5353
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
5454
name: 'Link check: Enterprise Server'
5555
env:
56-
VERSION: 'enterprise-server'
56+
DOCS_VERSION: 'enterprise-server'
5757
run: npm run link-check

script/check-internal-links.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ const config = {
3838
}
3939

4040
// Customize config for specific versions
41-
if (process.env.VERSION === 'dotcom') {
41+
if (process.env.DOCS_VERSION === 'dotcom') {
4242
// If Dotcom, skip Enterprise Server and GitHub AE links
4343
config.linksToSkip.push('^.*/enterprise-server@.*$', '^.*/enterprise/.*$', '^.*/github-ae@latest.*$')
44-
} else if (process.env.VERSION === 'enterprise-server') {
44+
} else if (process.env.DOCS_VERSION === 'enterprise-server') {
4545
// If Enterprise Server, skip links that are not Enterprise Server links
4646
config.path = `${englishRoot}/enterprise-server@${latest}`
4747
config.linksToSkip.push('^((?!enterprise-server@).)*$')
48-
} else if (process.env.VERSION === 'github-ae') {
48+
} else if (process.env.DOCS_VERSION === 'github-ae') {
4949
// If GitHub AE, skip links that are not GitHub AE links
5050
config.path = `${englishRoot}/github-ae@latest`
5151
config.linksToSkip.push('^((?!github-ae@latest).)*$')
@@ -54,8 +54,8 @@ if (process.env.VERSION === 'dotcom') {
5454
main()
5555

5656
async function main () {
57-
process.env.VERSION && allowedVersions.includes(process.env.VERSION)
58-
? console.log(`Checking internal links for version ${process.env.VERSION}!\n`)
57+
process.env.DOCS_VERSION && allowedVersions.includes(process.env.DOCS_VERSION)
58+
? console.log(`Checking internal links for version ${process.env.DOCS_VERSION}!\n`)
5959
: console.log('Checking internal links for all versions!\n')
6060

6161
console.time('check')

0 commit comments

Comments
 (0)