Skip to content
Merged
Changes from 1 commit
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
Next Next commit
change paths to use new version format
  • Loading branch information
sarahs committed Nov 17, 2020
commit fdc6ffc574145689cfd4c362b25e329a7509dafd
4 changes: 2 additions & 2 deletions script/archive-enterprise-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async function main () {
console.log(`Enterprise version to archive: ${version}`)
const pages = await (require('../lib/pages')())
const permalinksPerVersion = Object.keys(pages)
.filter(key => key.includes(`/enterprise/${version}`))
.filter(key => key.includes(`/enterprise-server@${version}`))

const urls = dryRun
? permalinksPerVersion.slice(0, 10).map(href => `${host}${href}`)
Expand Down Expand Up @@ -165,7 +165,7 @@ async function createRedirectPages (permalinks, pages, finalDirectory) {
// replace any liquid variables with the version number
oldPath = oldPath.replace('{{ page.version }}', version)
// ignore any old paths that are not in this version
if (!oldPath.includes(`/enterprise/${version}`)) return
if (!oldPath.includes(`/enterprise-server@${version}`)) return

const fullPath = path.join(finalDirectory, oldPath)
const filename = `${fullPath}/index.html`
Expand Down