File tree Expand file tree Collapse file tree 4 files changed +40
-9
lines changed
Expand file tree Collapse file tree 4 files changed +40
-9
lines changed Original file line number Diff line number Diff line change @@ -50,22 +50,31 @@ artifacts:
5050
5151deploy :
5252 - provider : GitHub
53- description : ' Release of version $(appveyor_build_version)'
53+ description : ' Release version $(appveyor_build_version)'
5454 auth_token :
5555 secure : 5K94QY8dHKlbjvlBpQaXwAkmDf+LQE3g5WlU9snnNMjDjf0UT4xDoOBCLWcmwZOm
5656 artifact : installer, package
5757 on :
5858 branch : master
5959 configuration : Release
6060
61+ - provider : GitHub
62+ description : ' Prerelease version $(appveyor_build_version)'
63+ prerelease : true
64+ auth_token :
65+ secure : 5K94QY8dHKlbjvlBpQaXwAkmDf+LQE3g5WlU9snnNMjDjf0UT4xDoOBCLWcmwZOm
66+ artifact : installer, package
67+ on :
68+ branch : develop
69+ configuration : Release
70+
6171 - provider : NuGet
6272 server : https://powershellgallery.com
6373 api_key :
6474 secure : 4STrzCp6wDsDBj/wCtmImMVL7wUI8DCGjdMBXGqQf9JZJ8LjmW5YSY8wtcHAv0XW
6575 artifact : package
6676 skip_symbols : true
6777 on :
68- branch : master
6978 configuration : Release
7079
7180 - provider : NuGet
@@ -74,5 +83,4 @@ deploy:
7483 secure : WPxjuSouwbCdM6I771BfIbOk8gA883+l9RKUCfFknaUT1vYPmTpT2ABF9r+J0JgR
7584 artifact : /.*\.symbols\.nupkg/
7685 on :
77- branch : master
7886 configuration : Release
Original file line number Diff line number Diff line change 3333 </ItemGroup >
3434 </Target >
3535
36- <Target Name =" Transform" Condition =" '$(TransformOnBuild)'=='true'" DependsOnTargets =" $(BeforeTransform);GetTransforms" AfterTargets =" BeforeBuild" Inputs =" @(Transforms)" Outputs =" % (Transforms. OutputFilePath)" >
36+ <Target Name =" Transform" Condition =" '$(TransformOnBuild)'=='true'" DependsOnTargets =" $(BeforeTransform);GetTransforms" AfterTargets =" BeforeBuild" Inputs =" @(Transforms)" Outputs =" @ (Transforms->'%( OutputFilePath)' )" >
3737 <Error Text =" The TextTransform.exe executable was not found." Condition =" !Exists('$(ExecutablePath)')" />
3838
3939 <PropertyGroup >
Original file line number Diff line number Diff line change 1010 {
1111 moduleVersion = new Version(1, 0);
1212 }
13+
14+ string prerelease = Host.ResolveParameterValue("", "", "Prerelease");
15+ string commitIdShort = Host.ResolveParameterValue("", "", "CommitIdShort");
16+ string publicRelease = Host.ResolveParameterValue("", "", "PublicRelease");
17+
18+ bool isPublicRelease = false;
19+ if (string.IsNullOrEmpty(prerelease) && bool.TryParse(publicRelease, out isPublicRelease) && !isPublicRelease)
20+ {
21+ prerelease = "-g" + commitIdShort;
22+ }
1323#>
1424# The MIT License (MIT)
1525#
@@ -95,6 +105,7 @@ PrivateData = @{
95105 ProjectUri = 'https://github.com/heaths/psmsi'
96106 LicenseUri = 'https://raw.githubusercontent.com/heaths/psmsi/master/LICENSE.txt'
97107 IconUri = 'https://raw.githubusercontent.com/heaths/psmsi/master/res/psmsi.png'
98- }
108+ <# if (!string.IsNullOrEmpty(prerelease)) { #> Prerelease = '<#= prerelease #>'
109+ <# } #> }
99110}
100111}
Original file line number Diff line number Diff line change 195195 <Target Name =" CalculateVersion" DependsOnTargets =" GetBuildVersion" AfterTargets =" GenerateAssemblyVersionInfo" >
196196 <ItemGroup >
197197 <T4ParameterValues Include =" PackageVersion" >
198- <Value >$(BuildVersion)</Value >
198+ <Value >$(BuildVersionSimple)</Value >
199+ <Visible >false</Visible >
200+ </T4ParameterValues >
201+ <T4ParameterValues Include =" Prerelease" >
202+ <Value >$(PrereleaseVersion)</Value >
203+ <Visible >false</Visible >
204+ </T4ParameterValues >
205+ <T4ParameterValues Include =" CommitIdShort" >
206+ <Value >$(GitCommitIdShort)</Value >
207+ <Visible >false</Visible >
208+ </T4ParameterValues >
209+ <T4ParameterValues Include =" PublicRelease" >
210+ <Value >$(PublicRelease)</Value >
199211 <Visible >false</Visible >
200212 </T4ParameterValues >
201213 </ItemGroup >
202214 </Target >
203- <Target Name =" BuildPackage" DependsOnTargets =" CalculateVersion" Inputs =" $(TargetPath);$(MSBuildProjectName).nuspec" Outputs =" $(OutputPath)MSI.$(BuildVersion ).nupkg" >
215+ <Target Name =" BuildPackage" DependsOnTargets =" CalculateVersion" Inputs =" $(TargetPath);$(MSBuildProjectName).nuspec" Outputs =" $(OutputPath)MSI.$(BuildVersionSimple ).nupkg" >
204216 <PropertyGroup >
205217 <ProjectPath >$(MSBuildProjectDirectory)\$(MSBuildProjectName).nuspec</ProjectPath >
206- <BuildCommand >$(NuGetCommand) pack "$(ProjectPath)" -Properties "SolutionDir=$(SolutionDir);Configuration=$(Configuration);Platform=$(Platform);Version=$(BuildVersion )" -OutputDirectory "$(OutputPath.TrimEnd('\'))" -Symbols -NonInteractive -NoPackageAnalysis</BuildCommand >
218+ <BuildCommand >$(NuGetCommand) pack "$(ProjectPath)" -Properties "SolutionDir=$(SolutionDir);Configuration=$(Configuration);Platform=$(Platform);Version=$(BuildVersionSimple )" -OutputDirectory "$(OutputPath.TrimEnd('\'))" -Symbols -NonInteractive -NoPackageAnalysis</BuildCommand >
207219 </PropertyGroup >
208- <Exec Command =" $(BuildCommand)" Outputs =" $(OutputPath)MSI.$(BuildVersion ).nupkg" >
220+ <Exec Command =" $(BuildCommand)" Outputs =" $(OutputPath)MSI.$(BuildVersionSimple ).nupkg" >
209221 <Output TaskParameter =" Outputs" ItemName =" FileWrites" />
210222 </Exec >
211223 </Target >
You can’t perform that action at this time.
0 commit comments