From ec45bfb1d539061503fdc722e03ca8a009e5b01d Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 7 Dec 2016 17:45:57 +0100 Subject: [PATCH] Fix the build script so it works! --- build/BuildClientFiles.bat | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/build/BuildClientFiles.bat b/build/BuildClientFiles.bat index 3b906051..c49ddb52 100644 --- a/build/BuildClientFiles.bat +++ b/build/BuildClientFiles.bat @@ -1,37 +1,42 @@ @ECHO OFF SETLOCAL :: SETLOCAL is on, so changes to the path not persist to the actual user's path - -SET release=%1 -ECHO Installing Npm NuGet Package -SET nuGetFolder=%CD%\..\packages\ +SET release=%1 +SET buildFolder=%CD% + +SET nuGetFolder=%CD%\..\packages ECHO Configured packages folder: %nuGetFolder% ECHO Current folder: %CD% -%CD%\..\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder% -Verbosity quiet +ECHO Installing Npm NuGet Package +"%CD%\..\.nuget\NuGet.exe" install Npm.js -OutputDirectory "%nuGetFolder%" -Verbosity quiet -for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\" -for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\" +for /f "delims=" %%A in ('dir "%nuGetFolder%\node.js.*" /b') do set "nodePath=%nuGetFolder%\%%A\" +for /f "delims=" %%A in ('dir "%nuGetFolder%\npm.js.*" /b') do set "npmPath=%nuGetFolder%\%%A\tools\" REM Ensures that we look for the just downloaded NPM, not whatever the user has installed on their machine -path=%npmPath%;%nodePath% +SET PATH=%npmPath%;%nodePath%;%PATH% +ECHO Path +ECHO %PATH% -ECHO %path% +ECHO Node +node -v -SET buildFolder=%CD% - -ECHO Change directory to %CD%\..\OurUmbraco.Client\ -CD %CD%\..\OurUmbraco.Client\ +ECHO Change directory to "%CD%\..\OurUmbraco.Client" +CD "%CD%\..\OurUmbraco.Client" ECHO. ECHO Setting node_modules folder to hidden to prevent VS13 from crashing on it while loading the websites project attrib +h node_modules -ECHO Do npm install and the gulp build +ECHO Npm Cache Clean call npm cache clean +ECHO Npm Install call npm install +ECHO Npm Install Gulp call npm install -g install gulp -g --quiet +ECHO Gulp build call gulp build ECHO Move back to the build folder