File tree Expand file tree Collapse file tree 6 files changed +13
-12
lines changed
Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v4
12+ with :
13+ fetch-depth : 0
1214 - name : Create and Push new tag
1315 shell : pwsh
1416 run : |
Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v4
12+ with :
13+ fetch-depth : 0
1214 - name : Create and Push new tag
1315 shell : pwsh
1416 run : |
Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v4
12+ with :
13+ fetch-depth : 0
1214 - name : Create and Push new tag
1315 shell : pwsh
1416 run : |
Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v4
12+ with :
13+ fetch-depth : 0
1214 - name : Create and Push new tag
1315 shell : pwsh
1416 run : |
Original file line number Diff line number Diff line change 11# PowerSell Versioning Script
22
3- This script contains functions to manage git tags for software versions
3+ This script contains functions to manage git tags for software versions.
4+
5+ Also there are sample Actions to trigger on each branch master/develop/release/hotfix.
Original file line number Diff line number Diff line change @@ -37,12 +37,11 @@ function New-Tag
3737
3838function Get-CurrentVersion
3939{
40+ $major = 0 ; $minor = 1
4041 $tags = Get-GitTags
4142
4243 if ($tags.Count -gt 0 )
4344 {
44- $major = 0 ; $minor = 1
45-
4645 foreach ($tag in $tags )
4746 {
4847 $pattern = ' ^v(\d+)\.(\d+)\.\d+$'
@@ -59,11 +58,9 @@ function Get-CurrentVersion
5958 }
6059 }
6160 }
62-
63- return " $major .$minor "
6461 }
6562
66- return " 0.1 "
63+ return " $major . $minor "
6764}
6865
6966function Get-NewPatch
@@ -81,12 +78,6 @@ function Get-NewPatch
8178 return $Prefix + " -" + (Get-Date ).ToString(" yyMMddhhmmss" )
8279}
8380
84- function Get-NextVersion
85- {
86- $currentVersion = Get-CurrentVersion
87- return ([decimal ]$currentVersion + 0.1 ).ToString()
88- }
89-
9081function Get-GitTags
9182{
9283 $tags = Invoke-Expression " git tag --list"
You can’t perform that action at this time.
0 commit comments