Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.

Commit 0ec8aaf

Browse files
committed
Change variable declaration localtion to fix issue with build script
1 parent c799ff7 commit 0ec8aaf

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

bin/build.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,19 @@ async function buildBinary () {
554554
process.exit(1)
555555
}
556556

557+
const INDEX = 'index.js'
558+
const websitePathForBinaries = path.resolve(path.join(websitePath, 'binaries', releaseChannel))
559+
const websitePathForVersionRoutesFolder = path.join(websitePath, '.dynamic', 'version')
560+
const websitePathForBinaryVersionRouteFolder = path.join(websitePathForVersionRoutesFolder, releaseChannel)
561+
const websitePathForBinaryVersionRouteFile = path.join(websitePathForBinaryVersionRouteFolder, INDEX)
562+
const websitePathForInstallScripts = path.join(websitePath, 'installation-scripts')
563+
const websitePathForLinuxAndMacInstallScript = path.join(websitePathForInstallScripts, 'install')
564+
const websitePathForWindowsInstallScript = path.join(websitePathForInstallScripts, 'install.txt')
565+
566+
// Ensure website version route folders exist
567+
fs.ensureDirSync(websitePathForVersionRoutesFolder)
568+
fs.ensureDirSync(websitePathForBinaryVersionRouteFolder)
569+
557570
//
558571
// Linux and macOS.
559572
//
@@ -669,18 +682,6 @@ async function buildBinary () {
669682
//
670683
// If it cannot find the Site.js web site, the build script will simply skip this step.
671684
//
672-
const INDEX = 'index.js'
673-
const websitePathForBinaries = path.resolve(path.join(websitePath, 'binaries', releaseChannel))
674-
const websitePathForVersionRoutesFolder = path.join(websitePath, '.dynamic', 'version')
675-
const websitePathForBinaryVersionRouteFolder = path.join(websitePathForVersionRoutesFolder, releaseChannel)
676-
const websitePathForBinaryVersionRouteFile = path.join(websitePathForBinaryVersionRouteFolder, INDEX)
677-
const websitePathForInstallScripts = path.join(websitePath, 'installation-scripts')
678-
const websitePathForLinuxAndMacInstallScript = path.join(websitePathForInstallScripts, 'install')
679-
const websitePathForWindowsInstallScript = path.join(websitePathForInstallScripts, 'install.txt')
680-
681-
// Ensure website version route folders exist
682-
fs.ensureDirSync(websitePathForVersionRoutesFolder)
683-
fs.ensureDirSync(websitePathForBinaryVersionRouteFolder)
684685

685686
console.log(' • Copying release binaries to the Site.js web site…')
686687

0 commit comments

Comments
 (0)