File tree 3 files changed +37
-2
lines changed
3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 6
6
- ' master'
7
7
- ' develop'
8
8
- ' netcore'
9
+ - ' release/*'
9
10
pull_request :
10
11
branches :
11
12
- ' *'
16
17
runs-on : windows-latest
17
18
env :
18
19
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 }}
20
21
steps :
21
22
- name : Checkout repository
22
23
uses : actions/checkout@v1
Original file line number Diff line number Diff line change 1
1
<!-- This file may be overwritten by automation. Only values allowed here are VersionPrefix and VersionSuffix. -->
2
2
<Project >
3
3
<PropertyGroup >
4
- <VersionPrefix >5.1 .0</VersionPrefix >
4
+ <VersionPrefix >5.2 .0</VersionPrefix >
5
5
<VersionSuffix ></VersionSuffix >
6
6
</PropertyGroup >
7
7
</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