diff --git a/appveyor.yml b/appveyor.yml index 564900eb5f..c419157625 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,34 +3,22 @@ shallow_clone: true build_script: - cmd: >- SET SLN=%CD% - + SET SRC=%SLN%\src - + SET PACKAGES=%SRC%\packages CD build SET "release=" - + FOR /F "skip=1 delims=" %%i IN (UmbracoVersion.txt) DO IF NOT DEFINED release SET "release=%%i" - + ECHO "Restoring NuGet into %PACKAGES%" %SRC%\.nuget\NuGet.exe sources Add -Name MyGetUmbracoCore -Source https://www.myget.org/F/umbracocore/api/v2/ >NUL - - %SRC%\.nuget\NuGet.exe restore %SRC%\Umbraco.Core\project.json -OutputDirectory %PACKAGES% -Verbosity quiet - %SRC%\.nuget\NuGet.exe restore %SRC%\umbraco.datalayer\packages.config -OutputDirectory %PACKAGES% -Verbosity quiet - - %SRC%\.nuget\NuGet.exe restore %SRC%\Umbraco.Web\project.json -OutputDirectory %PACKAGES% -Verbosity quiet - - %SRC%\.nuget\NuGet.exe restore %SRC%\Umbraco.Web.UI\packages.config -OutputDirectory %PACKAGES% -Verbosity quiet - - %SRC%\.nuget\NuGet.exe restore %SRC%\Umbraco.Tests\packages.config -OutputDirectory %PACKAGES% -Verbosity quiet - - - - %SRC%\.nuget\NuGet.exe restore %SRC%\umbraco.controls\packages.config -OutputDirectory %PACKAGES% -Verbosity quiet + %SRC%\.nuget\NuGet.exe restore %SRC%\umbraco.sln -Verbosity Quiet -NonInteractive -PackagesDirectory %PACKAGES% ECHO Building Release %release% build%APPVEYOR_BUILD_NUMBER% diff --git a/build/Build.bat b/build/Build.bat index 8455fddf0f..1c5d0a80ef 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -1,4 +1,4 @@ -::@ECHO OFF +@ECHO OFF :: UMBRACO BUILD FILE @@ -10,13 +10,13 @@ IF NOT EXIST UmbracoVersion.txt ( GOTO error ) -:: get the version and comment from UmbracoVersion.txt lines 2 and 3 +REM Get the version and comment from UmbracoVersion.txt lines 2 and 3 SET RELEASE= SET COMMENT= FOR /F "skip=1 delims=" %%i IN (UmbracoVersion.txt) DO IF NOT DEFINED RELEASE SET RELEASE=%%i FOR /F "skip=2 delims=" %%i IN (UmbracoVersion.txt) DO IF NOT DEFINED COMMENT SET COMMENT=%%i -:: process args +REM process args SET INTEGRATION=0 SET nuGetFolder=%CD%\..\src\packages\ @@ -77,7 +77,7 @@ GOTO processArgs :endProcessArgs -:: run +REM run SET VERSION=%RELEASE% IF [%COMMENT%] EQU [] (SET VERSION=%RELEASE%) ELSE (SET VERSION=%RELEASE%-%COMMENT%) @@ -86,8 +86,9 @@ ECHO. ECHO Building Umbraco %VERSION% ECHO. -SET MSBUILD="C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" -SET PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH% +SET MSBUILDPATH=C:\Program Files (x86)\MSBuild\14.0\Bin +SET MSBUILD="%MSBUILDPATH%\MsBuild.exe" +SET PATH="%MSBUILDPATH%";%PATH% ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %RELEASE% @@ -111,22 +112,23 @@ CALL InstallGit.cmd REM Adding the default Git path so that if it's installed it can actually be found REM This is necessary because SETLOCAL is on in InstallGit.cmd so that one might find Git, REM but the path setting is lost due to SETLOCAL -path=C:\Program Files (x86)\Git\cmd;C:\Program Files\Git\cmd;%PATH% +SET PATH="C:\Program Files (x86)\Git\cmd";"C:\Program Files\Git\cmd";%PATH% ECHO. ECHO Making sure we have a web.config IF NOT EXIST %CD%\..\src\Umbraco.Web.UI\web.config COPY %CD%\..\src\Umbraco.Web.UI\web.Template.config %CD%\..\src\Umbraco.Web.UI\web.config +ECHO. +ECHO Reporting NuGet version +%CD%\..\src\.nuget\NuGet.exe help | findstr "^NuGet Version:" + ECHO. ECHO Restoring NuGet packages ECHO Into %nuGetFolder% -..\src\.nuget\NuGet.exe restore ..\src\Umbraco.Core\project.json -OutputDirectory %nuGetFolder% -Verbosity quiet -..\src\.nuget\NuGet.exe restore ..\src\Umbraco.Compat7\project.json -OutputDirectory %nuGetFolder% -Verbosity quiet -..\src\.nuget\NuGet.exe restore ..\src\umbraco.datalayer\packages.config -OutputDirectory %nuGetFolder% -Verbosity quiet -..\src\.nuget\NuGet.exe restore ..\src\Umbraco.Web\project.json -OutputDirectory %nuGetFolder% -Verbosity quiet -..\src\.nuget\NuGet.exe restore ..\src\Umbraco.Web.UI\packages.config -OutputDirectory %nuGetFolder% -Verbosity quiet -..\src\.nuget\NuGet.exe restore ..\src\UmbracoExamine\packages.config -OutputDirectory %nuGetFolder% -Verbosity quiet +%CD%\..\src\.nuget\NuGet.exe restore %CD%\..\src\umbraco.sln -Verbosity Quiet -NonInteractive -PackagesDirectory %nuGetFolder% +IF ERRORLEVEL 1 GOTO :error +ECHO. ECHO. ECHO Performing MSBuild and producing Umbraco binaries zip files ECHO This takes a few minutes and logging is set to report warnings @@ -145,7 +147,6 @@ IF %SKIPNUGET% EQU 1 GOTO success ECHO. ECHO Adding Web.config transform files to the NuGet package REN .\_BuildOutput\WebApp\Views\Web.config Web.config.transform -:: REN .\_BuildOutput\WebApp\Xslt\Web.config Web.config.transform ECHO. ECHO Packing the NuGet release files @@ -169,6 +170,6 @@ ECHO. ECHO Errors were detected! ECHO. -:: don't pause if continuous integration else the build server waits forever -:: before cancelling the build (and, there is noone to read the output anyways) +REM don't pause if continuous integration else the build server waits forever +REM before cancelling the build (and, there is noone to read the output anyways) IF %INTEGRATION% NEQ 1 PAUSE diff --git a/build/Build.proj b/build/Build.proj index dbef46abe6..f40cad61fa 100644 --- a/build/Build.proj +++ b/build/Build.proj @@ -264,14 +264,13 @@ - - + + - $(BUILD_RELEASE) diff --git a/build/InstallGit.cmd b/build/InstallGit.cmd index 26f8088f35..ca66aed877 100644 --- a/build/InstallGit.cmd +++ b/build/InstallGit.cmd @@ -3,21 +3,23 @@ SETLOCAL REM SETLOCAL is on, so changes to the path not persist to the actual user's path git.exe --version -if %ERRORLEVEL%==9009 GOTO :trydefaultpath +IF %ERRORLEVEL%==9009 GOTO :trydefaultpath +REM OK, DONE GOTO :EOF :trydefaultpath -path=C:\Program Files (x86)\Git\cmd;C:\Program Files\Git\cmd;%PATH% +PATH=C:\Program Files (x86)\Git\cmd;C:\Program Files\Git\cmd;%PATH% git.exe --version -if %ERRORLEVEL%==9009 GOTO :showerror +IF %ERRORLEVEL%==9009 GOTO :showerror +REM OK, DONE GOTO :EOF :showerror ECHO Git is not in your path and could not be found in C:\Program Files (x86)\Git\cmd nor in C:\Program Files\Git\cmd -set /p install=" Do you want to install Git through Chocolatey [y/n]? " %=% -if %install%==y ( +SET /p install=" Do you want to install Git through Chocolatey [y/n]? " %=% +IF %install%==y ( GOTO :installgit -) else ( +) ELSE ( GOTO :cantcontinue ) diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe index 31fc9885e4..6804fb7da7 100644 Binary files a/src/.nuget/NuGet.exe and b/src/.nuget/NuGet.exe differ diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets new file mode 100644 index 0000000000..f0a336089b --- /dev/null +++ b/src/.nuget/NuGet.targets @@ -0,0 +1,138 @@ + + + + $(MSBuildProjectDirectory)\..\ + + + false + + + false + + + true + + + false + + + + + + + + + + + + + $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) + $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) + + + + + $(SolutionDir).nuget + packages.config + + + + + $(NuGetToolsPath)\NuGet.exe + @(PackageSource) + + "$(NuGetExePath)" + mono --runtime=v4.0.30319 $(NuGetExePath) + + $(TargetDir.Trim('\\')) + + -RequireConsent + -NonInteractive + + "$(SolutionDir) " + "$(SolutionDir)" + + + $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir) + $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols + + + + RestorePackages; + $(BuildDependsOn); + + + + + $(BuildDependsOn); + BuildPackage; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file