1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
- <Project ToolsVersion =" 4.0" DefaultTargets =" PackageModule " xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
2
+ <Project ToolsVersion =" 4.0" DefaultTargets =" CreateSolutionLevelDnnPackage " xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3
3
4
4
<PropertyGroup >
5
5
<MSBuildCommunityTasksPath Condition =" '$(MSBuildCommunityTasksPath)' == ''" >$(SolutionDir)\.build\</MSBuildCommunityTasksPath >
6
- <NuGetOuputDirectory >$(SolutionDir)</NuGetOuputDirectory >
6
+ <NuGetOuputDirectory >$(SolutionDir.TrimEnd('\') )</NuGetOuputDirectory >
7
7
</PropertyGroup >
8
8
<Import Project =" $(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets" />
9
9
10
- <Target Name =" CreateSolutionLevelDnnPackage" AfterTargets =" Build" Condition =" $(CreateSolutionDeploymentPackage)" DependsOnTargets =" CleanPackages; CopyNuspecFile; CreateAndPushNugetPackage ;" >
10
+ <Target Name =" CreateSolutionLevelDnnPackage" AfterTargets =" Build" Condition =" $(CreateSolutionDeploymentPackage)" DependsOnTargets =" CleanPackages; CopyNuspecFile; CreateSolutionLevelNugetPackage; PushSolutionLevelNugetPackage ;" >
11
11
<Message Text =" GenerateCode Solution Package" Importance =" High" >
12
12
</Message >
13
13
</Target >
32
32
33
33
</Target >
34
34
35
- <Target Name =" CreateAndPushNugetPackage " >
36
- <Message Importance =" high" Text =" Building packages " />
35
+ <Target Name =" CreateSolutionLevelNugetPackage " >
36
+ <Message Importance =" high" Text =" Creating solution NuGet deployment package " />
37
37
<Message Importance =" high" Text =" NuGet exe path is $(NuGetExeFilePath)" />
38
38
<Message Importance =" high" Text =" NuGet Solution Package version number is $(SolutionPackageVersionNumber)" />
39
- <Message Importance =" high" Text =" Package output directory is $(SolutionBuildPackagesFolder )" />
39
+ <Message Importance =" high" Text =" NuGet Solution Package will be output to $(NuGetOuputDirectory )" />
40
40
<PropertyGroup >
41
- <SolutionPackCommand >"$(NuGetExeFilePath)" pack "$(PackagingSolutionNuspecFilePath)" -Properties "Configuration=$(Configuration);Platform=$(Platform);PackagePath=$(SolutionBuildPackagesFolder)\;" $(NonInteractiveSwitch) -Version "$(SolutionPackageVersionNumber)" -OutputDirectory $(NuGetOuputDirectory) -Verbose</SolutionPackCommand >
42
- <SolutionPushCommand >"$(NuGetExeFilePath)" push $(NuGetOuputDirectory)\*.nupkg $(PushSolutionPackagesApiKey ) -s $(PushSolutionPackageTo) </ SolutionPushCommand >
41
+ <SolutionPackCommand Condition = " '$(SolutionPackageVersionNumber)' != '' " >"$(NuGetExeFilePath)" pack "$(PackagingSolutionNuspecFilePath)" -Properties "Configuration=$(Configuration);Platform=$(Platform);PackagePath=$(SolutionBuildPackagesFolder)\;" $(NonInteractiveSwitch) -Version "$(SolutionPackageVersionNumber)" -OutputDirectory " $(NuGetOuputDirectory)" -Verbose</SolutionPackCommand >
42
+ <SolutionPackCommand Condition = " '$(SolutionPackageVersionNumber)' == '' " >"$(NuGetExeFilePath)" pack "$(PackagingSolutionNuspecFilePath)" -Properties "Configuration=$(Configuration);Platform=$(Platform);PackagePath=$(SolutionBuildPackagesFolder)\;" $(NonInteractiveSwitch ) -OutputDirectory "$(NuGetOuputDirectory)" -Verbose</ SolutionPackCommand >
43
43
</PropertyGroup >
44
44
<Message Importance =" high" Text =" Build command is $(SolutionPackCommand)" />
45
- <Message Importance =" high" Text =" Push command is $(SolutionPushCommand)" />
46
- <Message Importance =" high" Text =" Expected Output Package is $(SolutionOutputPackage)" />
47
45
48
- <Exec Command =" $(SolutionPackCommand)"
49
- LogStandardErrorAsError =" true"
50
- Condition =" '$(OS)' == 'Windows_NT' " />
46
+ <Exec Command =" $(SolutionPackCommand)" />
51
47
<Message Importance =" high" Text =" Package created.." />
48
+ </Target >
52
49
50
+ <Target Name =" PushSolutionLevelNugetPackage" Condition =" '$(PushSolutionPackageTo)' != ''" >
51
+ <Message Importance =" high" Text =" Pushing solution NuGet deployment package to $(PushSolutionPackageTo)" />
52
+ <PropertyGroup >
53
+ <SolutionPushCommand >"$(NuGetExeFilePath)" push "$(NuGetOuputDirectory)\*.nupkg" $(PushSolutionPackagesApiKey) -s $(PushSolutionPackageTo) </SolutionPushCommand >
54
+ </PropertyGroup >
55
+ <Message Importance =" high" Text =" Push command is $(SolutionPushCommand)" />
53
56
<Exec Command =" $(SolutionPushCommand)" />
54
57
<Message Importance =" high" Text =" Package pushed to $(PushSolutionPackageTo)" />
55
58
</Target >
56
59
57
-
58
60
</Project >
0 commit comments