Skip to content

Commit 7c26969

Browse files
update version string
1 parent 06857d2 commit 7c26969

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- 'master'
77
- 'develop'
88
- 'netcore'
9+
- 'release/*'
910
pull_request:
1011
branches:
1112
- '*'
@@ -16,7 +17,7 @@ jobs:
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

PowerSlice/version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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>

build/get-version.ps1

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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']"

0 commit comments

Comments
 (0)