File tree Expand file tree Collapse file tree 3 files changed +9
-21
lines changed Expand file tree Collapse file tree 3 files changed +9
-21
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,6 @@ trigger:
6
6
exclude :
7
7
- docs
8
8
- README.md
9
- # resources:
10
- # repositories:
11
- # - repository: self
12
- # type: git
13
- # ref: main
14
9
jobs :
15
10
- job : cut_new_release_branch
16
11
displayName : Agent phase
@@ -22,14 +17,10 @@ jobs:
22
17
clean : true
23
18
persistCredentials : True
24
19
- task : PowerShell@2
25
- displayName : Bump up version
20
+ displayName : Bump up version and cut a release branch
26
21
inputs :
27
22
filePath : .\build\bump_version.ps1
28
23
arguments : .\dbops.psd1
29
- - task : PowerShell@2
30
- displayName : Cut a release branch
31
- inputs :
32
- filePath : .\build\git_release.ps1
33
24
env :
34
25
git_user_email : $(gitUserEmail)
35
26
git_username : $(gitUsername)
Original file line number Diff line number Diff line change 1
1
Param (
2
2
$Path = ' .\dbops.psd1'
3
3
)
4
+ git config -- global user.email $env: git_user_email
5
+ git config -- global user.name $env: git_username
4
6
$moduleFile = Invoke-Command - ScriptBlock ([scriptblock ]::Create((Get-Content $Path - Raw)))
5
7
$version = [Version ]$moduleFile.ModuleVersion
6
8
$regEx = " ^([\s]*ModuleVersion[\s]*\=[\s]*)\'(" + [regex ]::Escape($version ) + " )\'[\s]*`$ "
@@ -15,4 +17,9 @@ if ($version -le $publishedVersion) {
15
17
$content | Foreach-Object { $_ -replace $regEx , " `$ 1'$newVersion '" } | Out-File $Path - Force - Encoding utf8
16
18
$newModuleFile = Invoke-Command - ScriptBlock ([scriptblock ]::Create((Get-Content $Path - Raw)))
17
19
Write-Host " New build $ ( $newModuleFile.ModuleVersion ) "
18
- }
20
+ git add $moduleFile
21
+ git commit - m " v$version "
22
+ }
23
+ git push origin HEAD:development
24
+ git branch release/ $version
25
+ git push -- all origin
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments