This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds basic build/clean.cmd as well as traversal projects.
- Loading branch information
1 parent
ccbe4e6
commit 1c79b3b
Showing
11 changed files
with
373 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.26-prerelease-00711-02 | ||
1.0.26-prerelease-00731-01 |
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,2 @@ | ||
@call %~dp0run.cmd build-managed %* | ||
@exit /b %ERRORLEVEL% |
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,29 @@ | ||
@if "%_echo%" neq "on" echo off | ||
setlocal EnableDelayedExpansion | ||
|
||
echo Stop VBCSCompiler.exe execution. | ||
for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F | ||
|
||
if [%1] == [-all] ( | ||
echo Cleaning entire working directory ... | ||
call git clean -xdf | ||
exit /b !ERRORLEVEL! | ||
) | ||
|
||
if [%1]==[] set __args=-b | ||
call %~dp0run.cmd clean %__args% %* | ||
exit /b %ERRORLEVEL% | ||
|
||
:Usage | ||
echo. | ||
echo Repository cleaning script. | ||
echo. | ||
echo Options: | ||
echo -b - Deletes the binary output directory. | ||
echo -p - Deletes the repo-local nuget package directory. | ||
echo -c - Deletes the user-local nuget package cache. | ||
echo -all - Combines all of the above. | ||
echo. | ||
echo If no option is specified then clean.cmd -b is implied. | ||
|
||
exit /b 1 |
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,150 @@ | ||
{ | ||
"settings": { | ||
"ConfigurationGroup": { | ||
"description": "Sets the configuration group as Release or Debug", | ||
"valueType": "property", | ||
"values": ["Release", "Debug"], | ||
"defaultValue": "Debug" | ||
}, | ||
"MsBuildLogging": { | ||
"description": "MsBuild logging options.", | ||
"valueType": "passThrough", | ||
"values": [], | ||
"defaultValue": "/flp:v=normal" | ||
}, | ||
"MsBuildWarning": { | ||
"description": "MsBuild warning logging.", | ||
"valueType": "passThrough", | ||
"values": [], | ||
"defaultValue": "/flp2:warningsonly;logfile=msbuild.wrn" | ||
}, | ||
"MsBuildError": { | ||
"description": "MsBuild error logging.", | ||
"valueType": "passThrough", | ||
"values": [], | ||
"defaultValue": "/flp3:errorsonly;logfile=msbuild.err" | ||
}, | ||
"MsBuildParameters": { | ||
"description": "MsBuild building options.", | ||
"valueType": "passThrough", | ||
"values": [], | ||
"defaultValue": "/nologo /maxcpucount /verbosity:minimal /clp:Summary" | ||
}, | ||
"MsBuildBinClashLogger-Windows": { | ||
"description": "MsBuild Bin clash logger options for Windows.", | ||
"valueType": "passThrough", | ||
"values": [], | ||
"defaultValue": "/l:BinClashLogger,Tools\\net45\\Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log" | ||
}, | ||
"Project": { | ||
"description": "Project where the commands are going to be applied.", | ||
"valueType": "passThrough", | ||
"values": [], | ||
"defaultValue": "" | ||
}, | ||
"CleanAllProjects": { | ||
"description": "MsBuild target that deletes the binary output directory.", | ||
"valueType": "target", | ||
"values": [], | ||
"defaultValue": "" | ||
}, | ||
"CleanPackages": { | ||
"description": "MsBuild target that deletes the repo-local nuget package directory.", | ||
"valueType": "target", | ||
"values": [], | ||
"defaultValue": "" | ||
}, | ||
"CleanPackagesCache": { | ||
"description": "MsBuild target that deletes the user-local nuget package cache.", | ||
"valueType": "target", | ||
"values": [], | ||
"defaultValue": "" | ||
} | ||
}, | ||
"commands": { | ||
"build-managed":{ | ||
"alias":{ | ||
"binaries":{ | ||
"description": "Only builds binaries. It doesn't restore packages.", | ||
"settings":{ | ||
"RestoreDuringBuild": false, | ||
"BuildTests": false, | ||
"BuildPackages": false | ||
} | ||
}, | ||
"debug":{ | ||
"description": "Sets ConfigurationGroup=Debug or the value passed by the user.", | ||
"settings":{ | ||
"ConfigurationGroup": "Debug" | ||
} | ||
}, | ||
"release":{ | ||
"description": "Sets ConfigurationGroup=Release or the value passed by the user.", | ||
"settings":{ | ||
"ConfigurationGroup": "Release" | ||
} | ||
}, | ||
}, | ||
"defaultValues":{ | ||
"toolName": "msbuild", | ||
"settings": { | ||
"ConfigurationGroup": "default", | ||
"MsBuildLogging":"default", | ||
"MsBuildWarning":"default", | ||
"MsBuildError":"default" | ||
} | ||
} | ||
}, | ||
"clean":{ | ||
"alias":{ | ||
"b":{ | ||
"description": "Deletes the binary output directory.", | ||
"settings":{ | ||
"CleanAllProjects": "default" | ||
} | ||
}, | ||
"p":{ | ||
"description": "Deletes the repo-local nuget package directory.", | ||
"settings":{ | ||
"CleanPackages": "default" | ||
} | ||
}, | ||
"c":{ | ||
"description": "Deletes the user-local nuget package cache.", | ||
"settings":{ | ||
"CleanPackagesCache": "default" | ||
} | ||
} | ||
}, | ||
"defaultValues":{ | ||
"toolName": "msbuild", | ||
"settings": { | ||
"MsBuildLogging":"/flp:v=normal;LogFile=clean.log" | ||
} | ||
} | ||
} | ||
}, | ||
"tools": { | ||
"msbuild": { | ||
"osSpecific": { | ||
"windows": { | ||
"defaultParameters": "/nologo /verbosity:minimal /clp:Summary /maxcpucount /nodeReuse:false /l:BinClashLogger,Tools\\net45\\Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log", | ||
"path": "Tools/msbuild.cmd" | ||
}, | ||
}, | ||
"valueTypes": { | ||
"property": "/p:{name}={value}", | ||
"target": "/t:{name}", | ||
"internal": "/{name}" | ||
} | ||
}, | ||
"terminal": { | ||
"osSpecific": { | ||
"windows": { | ||
"filesExtension": "cmd" | ||
}, | ||
}, | ||
"valueTypes": {} | ||
} | ||
} | ||
} |
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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> | ||
<ItemGroup> | ||
<Project Include="netstandard/ref/*.csproj" /> | ||
<Project Include="netstandard/src/*.builds" /> | ||
<Project Include="platforms/dir.proj" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" /> | ||
|
||
<!-- Override CleanAllProjects from dir.traversal.targets and just remove the full BinDir --> | ||
<Target Name="CleanAllProjects"> | ||
<RemoveDir Directories="$(BinDir)" /> | ||
</Target> | ||
</Project> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Target Name="FilterProjects"> | ||
<ItemGroup> | ||
<!-- list each append as a seperate item to force re-evaluation of AdditionalProperties metadata --> | ||
<Project> | ||
<AdditionalProperties Condition="'%(Project.TargetGroup)'!=''">TargetGroup=%(Project.TargetGroup);%(Project.AdditionalProperties)</AdditionalProperties> | ||
</Project> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="BuildAllProjects" DependsOnTargets="FilterProjects"> | ||
<PropertyGroup> | ||
<DefaultBuildAllTarget Condition="'$(DefaultBuildAllTarget)'==''">$(MSBuildProjectDefaultTargets)</DefaultBuildAllTarget> | ||
</PropertyGroup> | ||
|
||
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity | ||
however since the project names are unique it will essentially force each to run in its own batch --> | ||
<MSBuild Targets="$(DefaultBuildAllTarget)" | ||
Projects="@(Project)" | ||
Condition="'$(SerializeProjects)'=='true' AND '%(Identity)' != ''" | ||
Properties="DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true" | ||
ContinueOnError="ErrorAndContinue" /> | ||
|
||
<MSBuild Targets="$(DefaultBuildAllTarget)" | ||
Projects="@(Project)" | ||
Condition="'$(SerializeProjects)'!='true'" | ||
Properties="DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true" | ||
BuildInParallel="true" | ||
ContinueOnError="ErrorAndContinue" /> | ||
|
||
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed --> | ||
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" /> | ||
</Target> | ||
|
||
<Target Name="CleanAllProjects" DependsOnTargets="FilterProjects"> | ||
<PropertyGroup> | ||
<DefaultCleanAllTarget Condition="'$(DefaultCleanAllTarget)'==''">Clean</DefaultCleanAllTarget> | ||
</PropertyGroup> | ||
|
||
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity | ||
however since the project names are unique it will essentially force each to run in its own batch --> | ||
<MSBuild Targets="$(DefaultCleanAllTarget)" | ||
Projects="@(Project)" | ||
Condition="'$(SerializeProjects)'=='true' AND '%(Identity)' != ''" | ||
Properties="CleanAllProjects=true" | ||
ContinueOnError="ErrorAndContinue" /> | ||
|
||
<MSBuild Targets="$(DefaultCleanAllTarget)" | ||
Projects="@(Project)" | ||
Condition="'$(SerializeProjects)'!='true'" | ||
Properties="CleanAllProjects=true" | ||
BuildInParallel="true" | ||
ContinueOnError="ErrorAndContinue" /> | ||
|
||
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed --> | ||
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" /> | ||
</Target> | ||
|
||
<PropertyGroup> | ||
<TraversalBuildDependsOn> | ||
BuildAllProjects; | ||
$(TraversalBuildDependsOn); | ||
</TraversalBuildDependsOn> | ||
|
||
<TraversalCleanDependsOn> | ||
CleanAllProjects; | ||
$(TraversalCleanDependsOn); | ||
</TraversalCleanDependsOn> | ||
</PropertyGroup> | ||
|
||
<Target Name="Build" DependsOnTargets="$(TraversalBuildDependsOn)" /> | ||
<Target Name="Clean" DependsOnTargets="$(TraversalCleanDependsOn)" /> | ||
<Target Name="Rebuild" DependsOnTargets="Clean;Build" /> | ||
</Project> |
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,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> | ||
<ItemGroup> | ||
<Project Include="net461/*.csproj"> | ||
<TargetGroup>net461</TargetGroup> | ||
</Project> | ||
<Project Include="xamarin.ios/*.csproj"> | ||
<TargetGroup>xamarin.ios</TargetGroup> | ||
</Project> | ||
</ItemGroup> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" /> | ||
</Project> | ||
|
Oops, something went wrong.