@@ -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