Add enlist.cmd
This commit is contained in:
Родитель
657211d0ce
Коммит
a1f1f1df58
26
README.md
26
README.md
|
@ -1,2 +1,28 @@
|
|||
# Home
|
||||
|
||||
The Home repository is the starting point for developers wanting to contribute to the WiX Toolset.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
The WiX Toolset is composed of several projects that are distributed across several Git repositories.
|
||||
The output of a project is published and shared with other projects via NuGet packages.
|
||||
Thus, you only need to enlist in the Git repositories required for your change.
|
||||
|
||||
Before you begin, you must have [Git][git] and the [.NET Core 2.0 SDK][core2] installed. [Visual Studio 2017.3][vs] can be used
|
||||
to get both.
|
||||
|
||||
To help developer productivity, the `enlist.cmd` in this repository can be used to manage a .sln file
|
||||
with all the projects you clone. Simply follow these steps to get going:
|
||||
|
||||
1. Create a folder to hold the WiX Toolset projects. For example, `C:\src\wixtoolset`
|
||||
2. Clone this repository into that folder: `git clone https://github.com/wixtoolset/Home.git C:\src\wixtoolset\Home`
|
||||
3. Run the `enlist.cmd` in your clone of the Home repository for the project you are interested in. For example: `C:\src\wixtoolset\Home\enlist.cmd Core`
|
||||
|
||||
The `enlist.cmd` will clone the desired project, create a `WixToolset.sln` in the root folder (e.g. `C:\src\wixtoolset`), add the
|
||||
requested projects to the solution and configure NuGet. You can run `enlist.cmd` multiple times to add additional projects.
|
||||
|
||||
|
||||
[git]: https://git-for-windows.github.io/
|
||||
[core2]: https://www.microsoft.com/net/core
|
||||
[vs]: https://www.visualstudio.com/vs/
|
|
@ -0,0 +1,58 @@
|
|||
@ECHO off
|
||||
SETLOCAL
|
||||
SET _P=%~dp0
|
||||
|
||||
:NextArg
|
||||
IF /I "%1"=="data" (CALL :Enlist Data& SET _E=1)
|
||||
IF /I "%1"=="extensibility" (CALL :Enlist Extensibility& SET _E=1)
|
||||
IF /I "%1"=="core" (CALL :Enlist Core& SET _E=1)
|
||||
IF "%1"=="" GOTO :Done
|
||||
|
||||
IF /I "%1"=="-?" GOTO :Syntax
|
||||
IF /I "%1"=="/?" GOTO :Syntax
|
||||
IF /I "%1"=="-h" GOTO :Syntax
|
||||
IF /I "%1"=="/h" GOTO :Syntax
|
||||
|
||||
IF "%_E%"=="" ECHO Error: Unknown project name: %1
|
||||
SHIFT
|
||||
GOTO NextArg
|
||||
|
||||
:Done
|
||||
IF "%_E%"=="" GOTO :NoProjects
|
||||
|
||||
IF NOT EXIST %_P%..\nuget.config COPY /Y %_P%nuget.config %_P%..\nuget.config
|
||||
|
||||
ECHO.
|
||||
ENDLOCAL
|
||||
GOTO :EOF
|
||||
|
||||
|
||||
:Enlist
|
||||
|
||||
SET _C=%~dp0
|
||||
PUSHD %_C%..
|
||||
|
||||
ECHO.
|
||||
ECHO Enlisting %1 to: %CD%\%1 ...
|
||||
|
||||
IF NOT EXIST WixToolset.sln dotnet new sln -n WixToolset || GOTO :EnlistDone
|
||||
|
||||
git clone https://github.com/wixtoolset/%1.git || GOTO :EnlistDone
|
||||
FOR /R %1 %%F IN (*.csproj) DO dotnet sln WixToolset.sln add %%~fF || GOTO :EnlistDone
|
||||
|
||||
:EnlistDone
|
||||
POPD
|
||||
GOTO :EOF
|
||||
|
||||
:NoProjects
|
||||
ECHO Error: You must specify at least one valid project to enlist.
|
||||
ECHO.
|
||||
|
||||
:Syntax
|
||||
ECHO Syntax: enlist project
|
||||
ECHO.
|
||||
ECHO Available projects:
|
||||
ECHO Data
|
||||
ECHO Extensibility
|
||||
ECHO Core
|
||||
ECHO.
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
|
||||
<add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
|
||||
<add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
|
||||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
</configuration>
|
Загрузка…
Ссылка в новой задаче