Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switch build system to fake+paket * [build] Push onto a branch ("ci" by default) * [build] Document env variables used by build * [build] Only consider merged tags * Fake: Fix Update task dependency * Fix F# 3 vs 4 references * Remove unused WebSharper.proj * build from sln, use FCT, update packages * fixes for build * whole solution compiling * fix Proxies.fsproj and packaging * Remove DebugTests configuration and fix related properties * use package versions same as master, opt-out of referencing transitive dependencies * more fixing of project files and updating sln * rc1 * add CommitPublish build target * add value of ExtraPath to Path in build * keep output packages in build folder, publish from there * Fix licenseUrl and projectUrl in nuget templates * Fix packaged FSharp.Core version * add setlocal, use GitToolPath env var * 4.0-rc
- Loading branch information
Showing
175 changed files
with
3,898 additions
and
3,220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<!-- Enable the restore command to run before builds --> | ||
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages> | ||
<!-- Download Paket.exe if it does not already exist --> | ||
<DownloadPaket Condition=" '$(DownloadPaket)' == '' ">true</DownloadPaket> | ||
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath> | ||
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath> | ||
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath> | ||
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<!-- Paket command --> | ||
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath> | ||
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath> | ||
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath> | ||
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand> | ||
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand> | ||
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT' AND Exists('$(PaketBootStrapperExePath)')">"$(PaketBootStrapperExePath)" $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand> | ||
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' AND Exists('$(PaketBootStrapperExePath)')">$(MonoPath) --runtime=v4.0.30319 $(PaketBootStrapperExePath) $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand> | ||
<!-- Commands --> | ||
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences> | ||
<PaketReferences Condition="!Exists('$(PaketReferences)')">$(MSBuildStartupDirectory)\paket.references</PaketReferences> | ||
<PaketReferences Condition="Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectFullPath).paket.references</PaketReferences> | ||
<RestoreCommand>$(PaketCommand) restore --references-files "$(PaketReferences)"</RestoreCommand> | ||
<DownloadPaketCommand>$(PaketBootStrapperCommand)</DownloadPaketCommand> | ||
<!-- We need to ensure packages are restored prior to assembly resolve --> | ||
<BuildDependsOn Condition="$(RestorePackages) == 'true'">RestorePackages; $(BuildDependsOn);</BuildDependsOn> | ||
</PropertyGroup> | ||
<Target Name="CheckPrerequisites"> | ||
<!-- Raise an error if we're unable to locate paket.exe --> | ||
<Error Condition="'$(DownloadPaket)' != 'true' AND !Exists('$(PaketExePath)')" Text="Unable to locate '$(PaketExePath)'" /> | ||
<MsBuild Targets="DownloadPaket" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadPaket=$(DownloadPaket)" /> | ||
</Target> | ||
<Target Name="DownloadPaket"> | ||
<Exec Command="$(DownloadPaketCommand)" IgnoreStandardErrorWarningFormat="true" | ||
Condition=" '$(DownloadPaket)' == 'true' AND '$(DownloadPaketCommand)' != '' AND !Exists('$(PaketExePath)')" /> | ||
</Target> | ||
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites"> | ||
<Exec Command="$(RestoreCommand)" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" ContinueOnError="true" /> | ||
</Target> | ||
</Project> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
@ECHO OFF | ||
@echo off | ||
setlocal | ||
set PATH=%GitToolPath%;%PATH% | ||
|
||
if "%VisualStudioVersion%"=="" ( | ||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\" ( | ||
set VisualStudioVersion=15.0 | ||
) else ( | ||
set VisualStudioVersion=14.0 | ||
) | ||
) | ||
cls | ||
|
||
set PATH=%ProgramFiles(x86)%\MSBuild\14.0\Bin;%WINDIR%\Microsoft.NET\Framework\v4.0.30319;%PATH% | ||
set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin;%PATH% | ||
set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin;%PATH% | ||
set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin;%PATH% | ||
.paket\paket.bootstrapper.exe | ||
if errorlevel 1 ( | ||
exit /b %errorlevel% | ||
) | ||
|
||
tools\nuget\nuget install FSharp.Core -version 3.0.2 -o packages | ||
.paket\paket.exe restore --touch-affected-refs | ||
if errorlevel 1 ( | ||
exit /b %errorlevel% | ||
) | ||
|
||
echo Building with Visual Studio %VisualStudioVersion% tools | ||
MSBuild.exe msbuild\WebSharper.proj /verbosity:minimal /p:VisualStudioVersion=%VisualStudioVersion% /p:Arguments="%*" /fileLogger /flp:PerformanceSummary /m | ||
packages\FAKE\tools\FAKE.exe build.fsx %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#load "tools/WebSharper.Fake.fsx" | ||
#r "packages/AjaxMin/lib/net40/AjaxMin.dll" | ||
|
||
open System.IO | ||
open Fake | ||
open WebSharper.Fake | ||
|
||
let version = "4.0" | ||
let pre = Some "rc" | ||
|
||
let baseVersion = | ||
version + match pre with None -> "" | Some x -> "-" + x | ||
|> Paket.SemVer.Parse | ||
|
||
let targets = MakeTargets { | ||
WSTargets.Default (ComputeVersion (Some baseVersion)) with | ||
SolutionFile = "WebSharper.sln" | ||
} | ||
|
||
let NeedsBuilding input output = | ||
let i = FileInfo(input) | ||
let o = FileInfo(output) | ||
not o.Exists || o.LastWriteTimeUtc < i.LastWriteTimeUtc | ||
|
||
let Minify () = | ||
let minify (path: string) = | ||
let min = Microsoft.Ajax.Utilities.Minifier() | ||
let out = Path.ChangeExtension(path, ".min.js") | ||
if NeedsBuilding path out then | ||
let raw = File.ReadAllText(path) | ||
let mjs = min.MinifyJavaScript(raw) | ||
File.WriteAllText(Path.ChangeExtension(path, ".min.js"), mjs) | ||
stdout.WriteLine("Written {0}", out) | ||
minify "src/compiler/WebSharper.Core.JavaScript/Runtime.js" | ||
minify "src/stdlib/WebSharper.Main/Json.js" | ||
minify "src/stdlib/WebSharper.Main/AnimFrame.js" | ||
|
||
let SetVersion () = | ||
let v = targets.ComputedVersion | ||
["msbuild/AssemblyInfo.fs"] | ||
|> List.map (fun f -> File.Copy(f + ".in", f, true); f) | ||
|> processTemplates [ | ||
"{version}", sprintf "%i.%i.%i.%s" v.Major v.Minor v.Patch v.Build | ||
"{assemblyversion}", sprintf "%i.%i.0.0" v.Major v.Minor | ||
] | ||
|
||
Target "Prepare" <| fun () -> | ||
Minify() | ||
SetVersion() | ||
targets.AddPrebuild "Prepare" | ||
|
||
Target "Build" DoNothing | ||
targets.BuildDebug ==> "Build" | ||
|
||
Target "CI-Release" DoNothing | ||
targets.Publish ==> "CI-Release" | ||
|
||
Target "Run" <| fun () -> | ||
shellExec { | ||
defaultParams with | ||
Program = @"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" | ||
CommandLine = "/r WebSharper.sln" | ||
} | ||
|> ignore | ||
|
||
"Build" ==> "Run" | ||
|
||
RunTargetOrDefault "Build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
#! /bin/sh | ||
#!/bin/bash | ||
if test "$OS" = "Windows_NT" | ||
then | ||
# use .Net | ||
|
||
rm -rf build | ||
xbuild msbuild/WebSharper.proj "/verbosity:minimal" "/p:MonoPrefix=mono" "/p:Arguments=$*" "/flp:PerformanceSummary" | ||
.paket/paket.bootstrapper.exe | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
|
||
.paket/paket.exe restore --touch-affected-refs | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
|
||
packages/FAKE/tools/FAKE.exe $@ --fsiargs build.fsx | ||
else | ||
# use mono | ||
mono .paket/paket.bootstrapper.exe | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
|
||
mono .paket/paket.exe restore --touch-affected-refs | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.