forked from Elders/ActivityStreams
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cmd
64 lines (49 loc) · 2.72 KB
/
build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@echo off
SETLOCAL
SET NUGET=%LocalAppData%\NuGet\NuGet.exe
@echo off
SETLOCAL
SET NUGET=%LocalAppData%\NuGet\NuGet.exe
SET FAKE=%LocalAppData%\FAKE\tools\Fake.exe
SET NYX=%LocalAppData%\Nyx\tools\build.fsx
SET GITVERSION=%LocalAppData%\GitVersion.CommandLine\tools\GitVersion.exe
SET MSPEC=%LocalAppData%\Machine.Specifications.Runner.Console\tools\mspec-clr4.exe
SET MSBUILD14_TOOLS_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"
SET MSBUILD12_TOOLS_PATH="%ProgramFiles(x86)%\MSBuild\12.0\bin\MSBuild.exe"
SET BUILD_TOOLS_PATH=%MSBUILD14_TOOLS_PATH%
IF NOT EXIST %MSBUILD14_TOOLS_PATH% (
echo In order to run this tool you need either Visual Studio 2015 or
echo Microsoft Build Tools 2015 tools installed.
echo.
echo Visit this page to download either:
echo.
echo http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs
echo.
echo Attempting to fall back to MSBuild 12 for building only
echo.
IF NOT EXIST %MSBUILD12_TOOLS_PATH% (
echo Could not find MSBuild 12. Please install build tools ^(See above^)
exit /b 1
) else (
set BUILD_TOOLS_PATH=%MSBUILD12_TOOLS_PATH%
)
)
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%NUGET%'"
echo Downloading latest version of FAKE...
IF NOT EXIST %LocalAppData%\FAKE %NUGET% "install" "FAKE" "-OutputDirectory" "%LocalAppData%" "-ExcludeVersion" "-Version" "4.4.4"
echo Downloading latest version of NuGet.Core...
IF NOT EXIST %LocalAppData%\NuGet.Core %NUGET% "install" "NuGet.Core" "-OutputDirectory" "%LocalAppData%" "-ExcludeVersion" "-Version" "2.8.6"
echo Downloading latest version of GitVersion.CommandLine...
IF NOT EXIST %LocalAppData%\GitVersion.CommandLine %NUGET% "install" "GitVersion.CommandLine" "-OutputDirectory" "%LocalAppData%" "-ExcludeVersion" "-Version" "3.3.0"
echo Downloading latest version of Machine.Specifications.Runner.Console...
IF NOT EXIST %LocalAppData%\Machine.Specifications.Runner.Console %NUGET% "install" "Machine.Specifications.Runner.Console" "-OutputDirectory" "%LocalAppData%" "-ExcludeVersion" "-Version" "0.9.2"
echo Downloading latest version of Nyx...
%NUGET% "install" "Nyx" "-OutputDirectory" "%LocalAppData%" "-ExcludeVersion" "-PreRelease"
SET TARGET="Build"
IF NOT [%1]==[] (set TARGET="%1")
SET SUMMARY="ActivityStreams"
SET DESCRIPTION="ActivityStreams"
%FAKE% %NYX% "target=%TARGET%" appName=ActivityStreams appSummary=%SUMMARY% appDescription=%DESCRIPTION%
%FAKE% %NYX% "target=RunTests" appName=ActivityStreams.Tests appType=tests appSummary=%SUMMARY% appDescription=%DESCRIPTION%