-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.msbuild
274 lines (251 loc) · 17.8 KB
/
entrypoint.msbuild
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets="Help"
ToolsVersion="11.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Directories -->
<!--
The workspace directory is defined as the directory that contains the 'settings.props' file.
Given that the current file has to live in the same directory as the 'settings.props' file that
means that the workspace directory is the 'MsBuildProjectDirectory' for the current file.
-->
<DirWorkspace>$(MSBuildProjectDirectory)</DirWorkspace>
<!--
The directory in which the configuration files, like settings.props, are located.
-->
<DirUserSettings>$(DirWorkspace)</DirUserSettings>
<!-- nBuildKit -->
<!--
Defines the version number of the entrypoint file
-->
<NBuildKitConfigurationVersion>0.9</NBuildKitConfigurationVersion>
<!--
Hard-code the paths to the different directories because we're dog-fooding here we know exactly
where all the files are.
-->
<DirNBuildKit>$(MSBuildProjectDirectory)\src\nbuildkit</DirNBuildKit>
<DirNBuildKitMsBuildActions>$(DirNBuildKit)\actions</DirNBuildKitMsBuildActions>
<DirNBuildKitMsBuildEntryPoint>$(DirNBuildKit)\entrypoint</DirNBuildKitMsBuildEntryPoint>
<DirBuildKitMsBuildExecutors>$(DirNBuildKit)\executors</DirBuildKitMsBuildExecutors>
<DirNBuildKitMsBuildTasks>$(DirWorkspace)\build\bootstrap</DirNBuildKitMsBuildTasks>
<!--
Hard-code the path to the extensions assembly. If it doesn't exist, it will be build.
-->
<FileNBuildKitExtensionsAssembly>$(DirNBuildKitMsBuildTasks)\nBuildKit.MsBuild.Tasks.dll</FileNBuildKitExtensionsAssembly>
</PropertyGroup>
<!--
Collect the standard paths for injection into nBuildKit.
-->
<PropertyGroup>
<Locations>
DirUserSettings=$(DirUserSettings);
DirNBuildKitMsBuildActions=$(DirNBuildKitMsBuildActions);
DirNBuildKitMsBuildTasks=$(DirNBuildKitMsBuildTasks);
DirExecutors=$(DirBuildKitMsBuildExecutors);
</Locations>
<Files>
SharedPropertyFile=$(DirWorkspace)\settings.props;
ArtefactPropertyFile=$(DirWorkspace)\artefacts.settings.props;
</Files>
</PropertyGroup>
<!--
Display the help text for the current script and then exit.
-->
<Target Name="Help">
<Message Text="nBuildKit (bootstrap edition) - Build system" />
<Message Text="Copyright 2014 nBuildKit. Apache License, Version 2.0" />
<Message Text="" />
<Message Text="The following targets exist:" />
<Message Text="" />
<Message Text="- Build: Executes the build sequence. Build steps are as defined by the 'BuildStepsToExecute' in the 'build.settings.props' file." />
<Message Text=" Additional properties that can be specified are:" />
<Message Text=" * DirWorkspace - The full path to the directory that is the top-level directory in which all the files for the" />
<Message Text=" build, test, deploy stage can be found. During the process there should never be a need to go" />
<Message Text=" any futher up the directory hierarchy to find files." />
<Message Text=" * DirUserSettings - The full path to the directory in which the configuration files, like settings.props, are located." />
<Message Text=" * DirBuildServerSettings - The full path to the directory in which the build server specific configuration files are located." />
<Message Text=" * GroupsToExecute - A comma separated list of groups for which the build steps should be executed." />
<Message Text=" Available groups are Clean and the groups defined in the BuildStepsToExecute list." />
<Message Text=" * FileEnvironment - The full path to an MsBuild properties file that contains the environment settings for the current environment." />
<Message Text=" This file should at least contain a property called 'ExistsEnvironmentSettings' for which the value should be set to true." />
<Message Text=" * UseEnvironmentFrom - A property that indicates where the environment.props file should be loaded from." />
<Message Text=" Valid options are:" />
<Message Text=" - 'File' - Load the environment information from the user specified file, if it exists." />
<Message Text=" - 'User' - Load the environment information from file pointed to by the user environment variable" />
<Message Text=" NBUILDKIT_USER_ENVIRONMENT_FILE, if it exists" />
<Message Text=" - 'Machine' - Load the environment information from file pointed to by the machine environment variable" />
<Message Text=" NBUILDKIT_MACHINE_ENVIRONMENT_FILE, if it exists" />
<Message Text=" - 'Workspace' - Load the environment information from the file in the workspace, if it exists" />
<Message Text="- Test: Executes the test sequence. Test steps are defined by the 'TestStepsToExecute' in the 'test.settings.props' file." />
<Message Text=" Additional properties that can be specified are:" />
<Message Text=" * DirWorkspace - The full path to the directory that is the top-level directory in which all the files for the" />
<Message Text=" build, test, deploy stage can be found. During the process there should never be a need to go" />
<Message Text=" any futher up the directory hierarchy to find files." />
<Message Text=" * DirUserSettings - The full path to the directory in which the configuration files, like settings.props, are located." />
<Message Text=" * DirBuildServerSettings - The full path to the directory in which the build server specific configuration files are located." />
<Message Text=" * GroupsToExecute - A comma separated list of groups for which the build steps should be executed." />
<Message Text=" Available groups are Clean and the groups defined in the TestStepsToExecute list." />
<Message Text=" * FileEnvironment - The full path to an MsBuild properties file that contains the environment settings for the current environment." />
<Message Text=" This file should at least contain a property called 'ExistsEnvironmentSettings' for which the value should be set to true." />
<Message Text=" * UseEnvironmentFrom - A property that indicates where the environment.props file should be loaded from." />
<Message Text=" Valid options are:" />
<Message Text=" - 'File' - Load the environment information from the user specified file, if it exists." />
<Message Text=" - 'User' - Load the environment information from file pointed to by the user environment variable" />
<Message Text=" NBUILDKIT_USER_ENVIRONMENT_FILE, if it exists" />
<Message Text=" - 'Machine' - Load the environment information from file pointed to by the machine environment variable" />
<Message Text=" NBUILDKIT_MACHINE_ENVIRONMENT_FILE, if it exists" />
<Message Text=" - 'Workspace' - Load the environment information from the file in the workspace, if it exists" />
<Message Text="- Deploy: Executes the deploy sequence. Deploy steps are as defined by the 'DeployStepsToExecute' in the 'deploy.settings.props' file." />
<Message Text=" Additional properties that can be specified are:" />
<Message Text=" * DirWorkspace - The full path to the directory that is the top-level directory in which all the files for the" />
<Message Text=" build, test, deploy stage can be found. During the process there should never be a need to go" />
<Message Text=" any futher up the directory hierarchy to find files." />
<Message Text=" * DirUserSettings - The full path to the directory in which the configuration files, like settings.props, are located." />
<Message Text=" * DirBuildServerSettings - The full path to the directory in which the build server specific configuration files are located." />
<Message Text=" * GroupsToExecute - A comma separated list of groups for which the build steps should be executed." />
<Message Text=" Available groups are Clean and the groups defined in the DeployStepsToExecute list." />
<Message Text=" * FileEnvironment - The full path to an MsBuild properties file that contains the environment settings for the current environment." />
<Message Text=" This file should at least contain a property called 'ExistsEnvironmentSettings' for which the value should be set to true." />
<Message Text=" * UseEnvironmentFrom - A property that indicates where the environment.props file should be loaded from." />
<Message Text=" Valid options are:" />
<Message Text=" - 'File' - Load the environment information from the user specified file, if it exists." />
<Message Text=" - 'User' - Load the environment information from file pointed to by the user environment variable" />
<Message Text=" NBUILDKIT_USER_ENVIRONMENT_FILE, if it exists" />
<Message Text=" - 'Machine' - Load the environment information from file pointed to by the machine environment variable" />
<Message Text=" NBUILDKIT_MACHINE_ENVIRONMENT_FILE, if it exists" />
<Message Text=" - 'Workspace' - Load the environment information from the file in the workspace, if it exists" />
<Message Text="" />
<Message Text="Additionally the following environment variables may be defined:" />
<Message Text="- NBUILDKIT_USER_ENVIRONMENT_FILE - A user level environment variable that defines the full path to an MsBuild properties file that contains the environment settings." />
<Message Text=" This file should at least contain a property called 'ExistsEnvironmentSettings' for which the value should be set to true." />
<Message Text="- NBUILDKIT_MACHINE_ENVIRONMENT_FILE - A machine level environment variable that defines the full path to an MsBuild properties file that contains the environment settings." />
<Message Text=" This file should at least contain a property called 'ExistsEnvironmentSettings' for which the value should be set to true." />
<Message Text="- NBUILDKIT_BUILDSERVER_ENVIRONMENT_DIR - A user or machine level environment variable that defines the directory path to an MsBuild properties file that contains the" />
<Message Text=" environment settings for the build server." />
<Message Text=" This file should at least contain two properties: One property called 'ExistsBuildServerEnvironmentSettings' for which the" />
<Message Text=" value should be set to true, and a property called 'VersionBuildServerEnvironmentSettings' for which the value should be set to ." />
<Message Text=" value should be set to the version of the settings file." />
<Message Text="- Help: Displays this text." />
</Target>
<!--
Invoke the build steps as defined by the 'settings.props' file by invoking the nBuildKit 'build.msbuild'
script and passing the path to the 'settings.props' file and the version of nBuildKit that is going to
be used to execute the build.
-->
<Target
DependsOnTargets="_nBuildKit_EntryPoint_SetNBuildKitTarget_Build"
Name="Build">
<CallTarget Targets="_nBuildKit_EntryPoint_Execute" />
</Target>
<Target Name="_nBuildKit_EntryPoint_SetNBuildKitTarget_Build">
<PropertyGroup>
<TargetToExecute>Build</TargetToExecute>
</PropertyGroup>
</Target>
<!--
Invoke the test steps as defined by the 'settings.props' file by invoking the nBuildKit 'test.msbuild'
script and passing the path to the 'settings.props' file and the version of nBuildKit that is going to
be used to execute the tests.
-->
<Target
DependsOnTargets="_nBuildKit_EntryPoint_SetNBuildKitTarget_Test"
Name="Test">
<CallTarget Targets="_nBuildKit_EntryPoint_Execute" />
</Target>
<Target Name="_nBuildKit_EntryPoint_SetNBuildKitTarget_Test">
<PropertyGroup>
<TargetToExecute>Test</TargetToExecute>
</PropertyGroup>
</Target>
<!--
Invoke the deploy steps as defined by the 'settings.props' file by invoking the nBuildKit 'deploy.msbuild'
script and passing the path to the 'settings.props' file and the version of nBuildKit that is going to
be used to execute the deploy.
-->
<Target
DependsOnTargets="_nBuildKit_EntryPoint_SetNBuildKitTarget_Deploy"
Name="Deploy">
<CallTarget Targets="_nBuildKit_EntryPoint_Execute" />
</Target>
<Target Name="_nBuildKit_EntryPoint_SetNBuildKitTarget_Deploy">
<PropertyGroup>
<TargetToExecute>Deploy</TargetToExecute>
</PropertyGroup>
</Target>
<Target Name="_nBuildKit_EntryPoint_Bootstrap">
<PropertyGroup>
<DirNBuildKitExtensionsAssembly>$([System.IO.Path]::GetDirectoryName($(FileNBuildKitExtensionsAssembly)))</DirNBuildKitExtensionsAssembly>
</PropertyGroup>
<ItemGroup>
<BootstrapFilesToDelete Include="$(DirNBuildKitExtensionsAssembly)\**\*.*" />
<BootstrapFilesToDelete Include="$(DirWorkspace)\build\configurations\**\*.*" />
<BootstrapFilesToDelete Include="$(DirWorkspace)\build\temp\**\*.*" />
</ItemGroup>
<Delete
Condition=" '@(BootstrapFilesToDelete)' != ''"
ContinueOnError="True"
Files="@(BootstrapFilesToDelete)" />
<RemoveDir
Condition=" '$(DirNBuildKitExtensionsAssembly)' != '' "
ContinueOnError="True"
Directories="$(DirNBuildKitExtensionsAssembly)" />
<PropertyGroup>
<BootstrapIncludes>
FileImports=$(DirNBuildKitMsBuildEntryPoint)\import.build.props;
</BootstrapIncludes>
<BootstrapSettings>
Configuration=Deploy
</BootstrapSettings>
</PropertyGroup>
<MSBuild
BuildInParallel="False"
Projects="$(DirNBuildKitMsBuildActions)\shared.bootstrap.build.tasks.msbuild"
Properties="DirWorkspace=$(DirWorkspace);$(Locations);$(Files);$(BootstrapSettings);$(BootstrapIncludes);DirUserConfiguration=$(DirUserSettings)"
RebaseOutputs="False"
RemoveProperties=""
RunEachTargetSeparately="True"
SkipNonexistentProjects="False"
StopOnFirstFailure="True"
TargetAndPropertyListSeparators=""
Targets=""
ToolsVersion="$(MSBuildToolsVersion)"
UnloadProjectsOnCompletion="True"
UseResultsCache="True">
</MSBuild>
<MSBuild
BuildInParallel="False"
Projects="$(DirNBuildKitMsBuildActions)\shared.bootstrap.generate.targetsfile.msbuild"
Properties="DirWorkspace=$(DirWorkspace);$(Locations);$(Files);$(BootstrapSettings);$(BootstrapIncludes);DirUserConfiguration=$(DirUserSettings)"
RebaseOutputs="False"
RemoveProperties=""
RunEachTargetSeparately="True"
SkipNonexistentProjects="False"
StopOnFirstFailure="True"
TargetAndPropertyListSeparators=""
Targets=""
ToolsVersion="$(MSBuildToolsVersion)"
UnloadProjectsOnCompletion="True"
UseResultsCache="True">
</MSBuild>
</Target>
<Target
DependsOnTargets="_nBuildKit_EntryPoint_Bootstrap"
Name="_nBuildKit_EntryPoint_Execute">
<MSBuild
BuildInParallel="False"
Projects="$(DirNBuildKitMsBuildEntryPoint)\run.msbuild"
Properties="DirWorkspace=$(DirWorkspace);$(Locations);$(Files)"
RebaseOutputs="False"
RemoveProperties=""
RunEachTargetSeparately="True"
SkipNonexistentProjects="False"
StopOnFirstFailure="True"
TargetAndPropertyListSeparators=""
Targets="$(TargetToExecute)"
ToolsVersion="$(MSBuildToolsVersion)"
UnloadProjectsOnCompletion="True"
UseResultsCache="True">
</MSBuild>
</Target>
</Project>