File tree Expand file tree Collapse file tree 3 files changed +37
-2
lines changed
Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 66 - ' master'
77 - ' develop'
88 - ' netcore'
9+ - ' release/*'
910 pull_request :
1011 branches :
1112 - ' *'
1617 runs-on : windows-latest
1718 env :
1819 buildConfiguration : release
19- versionSuffix : ${{ github.ref == 'refs/heads/develop' && '-pre -' || '-ci-' }}${{github.RUN_NUMBER }}
20+ versionSuffix : ${{ github.ref == 'refs/heads/develop' && '-inte -' || contains(github.ref,'release/') && '-pre-' || '-ci-' }}${{github.RUN_NUMBER }}
2021 steps :
2122 - name : Checkout repository
2223 uses : actions/checkout@v1
Original file line number Diff line number Diff line change 11<!-- This file may be overwritten by automation. Only values allowed here are VersionPrefix and VersionSuffix. -->
22<Project >
33 <PropertyGroup >
4- <VersionPrefix >5.1 .0</VersionPrefix >
4+ <VersionPrefix >5.2 .0</VersionPrefix >
55 <VersionSuffix ></VersionSuffix >
66 </PropertyGroup >
77</Project >
Original file line number Diff line number Diff line change 1+ Param ([string ]$branchName , [Int ]$buildCounter , [String ]$publishPackagesParam )
2+
3+ if (! $branchName -or ! $buildCounter ) {
4+ Write-Error " `$ branchName and `$ buildCounter parameters must be supplied"
5+ exit 1
6+ }
7+
8+ Function GetVersion ($path ) {
9+ [xml ] $versionFile = Get-Content $path
10+ return $versionFile.SelectSingleNode (" Project/PropertyGroup/VersionPrefix" ).InnerText
11+ }
12+
13+ $publishPackages = " False"
14+ if ($publishPackagesParam ) {
15+ $publishPackages = $publishPackagesParam
16+ }
17+
18+ $assemblyVersion = GetVersion " PowerSlice/version.props"
19+
20+ if (! $assemblyVersion ) {
21+ $assemblyVersion = " 2.0.0"
22+ }
23+
24+ if (" %publishPackages%" -eq " True" )
25+ {
26+ $publishPackages = " True"
27+ }
28+ $informationalVersion = " $assemblyVersion " -f $buildCounter
29+
30+ " AssemblyVersion: $assemblyVersion "
31+ " AssemblyInformationalVersion: $informationalVersion "
32+
33+ " ##teamcity[setParameter name='packageVersion' value='$informationalVersion ']"
34+ " ##teamcity[setParameter name='publishPackages' value='$publishPackages ']"
You can’t perform that action at this time.
0 commit comments