Skip to content

Commit 4ebead0

Browse files
committed
updates for 2.2.0
1 parent 845777a commit 4ebead0

File tree

10 files changed

+203
-20
lines changed

10 files changed

+203
-20
lines changed

LICENSE renamed to LICENSE.md

+29-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
Apache License
1+
Apache License
32
Version 2.0, January 2004
43
http://www.apache.org/licenses/
54

@@ -172,4 +171,31 @@
172171
of any other Contributor, and only if You agree to indemnify,
173172
defend, and hold each Contributor harmless for any liability
174173
incurred by, or claims asserted against, such Contributor by reason
175-
of your accepting any such warranty or additional liability.
174+
of your accepting any such warranty or additional liability.
175+
176+
END OF TERMS AND CONDITIONS
177+
178+
APPENDIX: How to apply the Apache License to your work.
179+
180+
To apply the Apache License to your work, attach the following
181+
boilerplate notice, with the fields enclosed by brackets "{}"
182+
replaced with your own identifying information. (Don't include
183+
the brackets!) The text should be enclosed in the appropriate
184+
comment syntax for the file format. We also recommend that a
185+
file or class name and description of purpose be included on the
186+
same "printed page" as the copyright notice for easier
187+
identification within third-party archives.
188+
189+
Copyright {yyyy} {name of copyright owner}
190+
191+
Licensed under the Apache License, Version 2.0 (the "License");
192+
you may not use this file except in compliance with the License.
193+
You may obtain a copy of the License at
194+
195+
http://www.apache.org/licenses/LICENSE-2.0
196+
197+
Unless required by applicable law or agreed to in writing, software
198+
distributed under the License is distributed on an "AS IS" BASIS,
199+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200+
See the License for the specific language governing permissions and
201+
limitations under the License.

yaf_dnn/.nuget/NuGet.Config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
</configuration>

yaf_dnn/.nuget/NuGet.targets

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Download NuGet.exe if it does not already exist -->
13+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">true</DownloadNuGetExe>
14+
</PropertyGroup>
15+
16+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
17+
<!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
18+
<!--
19+
<PackageSource Include="https://nuget.org/api/v2/" />
20+
<PackageSource Include="https://my-nuget-source/nuget/" />
21+
-->
22+
</ItemGroup>
23+
24+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
25+
<!-- Windows specific commands -->
26+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
27+
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
28+
<PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
29+
</PropertyGroup>
30+
31+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
32+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
33+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
34+
<PackagesConfig>packages.config</PackagesConfig>
35+
<PackagesDir>$(SolutionDir)packages</PackagesDir>
36+
</PropertyGroup>
37+
38+
<PropertyGroup>
39+
<!-- NuGet command -->
40+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
41+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
42+
43+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
44+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
45+
46+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
47+
48+
<!-- Commands -->
49+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" -o "$(PackagesDir)"</RestoreCommand>
50+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
51+
52+
<!-- Make the build depend on restore packages -->
53+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
54+
RestorePackages;
55+
$(BuildDependsOn);
56+
</BuildDependsOn>
57+
58+
<!-- Make the build depend on restore packages -->
59+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
60+
$(BuildDependsOn);
61+
BuildPackage;
62+
</BuildDependsOn>
63+
</PropertyGroup>
64+
65+
<Target Name="CheckPrerequisites">
66+
<!-- Raise an error if we're unable to locate nuget.exe -->
67+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
68+
<SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
69+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
70+
</Target>
71+
72+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
73+
<Exec Command="$(RestoreCommand)"
74+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
75+
76+
<Exec Command="$(RestoreCommand)"
77+
LogStandardErrorAsError="true"
78+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
79+
</Target>
80+
81+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
82+
<Exec Command="$(BuildCommand)"
83+
Condition=" '$(OS)' != 'Windows_NT' " />
84+
85+
<Exec Command="$(BuildCommand)"
86+
LogStandardErrorAsError="true"
87+
Condition=" '$(OS)' == 'Windows_NT' " />
88+
</Target>
89+
90+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v$(MSBuildToolsVersion).dll">
91+
<ParameterGroup>
92+
<OutputFilename ParameterType="System.String" Required="true" />
93+
</ParameterGroup>
94+
<Task>
95+
<Reference Include="System.Core" />
96+
<Using Namespace="System" />
97+
<Using Namespace="System.IO" />
98+
<Using Namespace="System.Net" />
99+
<Using Namespace="Microsoft.Build.Framework" />
100+
<Using Namespace="Microsoft.Build.Utilities" />
101+
<Code Type="Fragment" Language="cs">
102+
<![CDATA[
103+
try {
104+
OutputFilename = Path.GetFullPath(OutputFilename);
105+
106+
Log.LogMessage("Downloading latest version of NuGet.exe...");
107+
WebClient webClient = new WebClient();
108+
webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
109+
110+
return true;
111+
}
112+
catch (Exception ex) {
113+
Log.LogErrorFromException(ex);
114+
return false;
115+
}
116+
]]>
117+
</Code>
118+
</Task>
119+
</UsingTask>
120+
121+
<UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v$(MSBuildToolsVersion).dll">
122+
<ParameterGroup>
123+
<EnvKey ParameterType="System.String" Required="true" />
124+
<EnvValue ParameterType="System.String" Required="true" />
125+
</ParameterGroup>
126+
<Task>
127+
<Using Namespace="System" />
128+
<Code Type="Fragment" Language="cs">
129+
<![CDATA[
130+
try {
131+
Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
132+
}
133+
catch {
134+
}
135+
]]>
136+
</Code>
137+
</Task>
138+
</UsingTask>
139+
</Project>

yaf_dnn/.nuget/nuget.exe

1.58 MB
Binary file not shown.

0 commit comments

Comments
 (0)