Skip to content

Commit b50621b

Browse files
authored
Merge 389bb33 into 61c8383
2 parents 61c8383 + 389bb33 commit b50621b

File tree

5 files changed

+14
-25
lines changed

5 files changed

+14
-25
lines changed

azure-main.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ trigger:
66
exclude:
77
- docs
88
- README.md
9-
# resources:
10-
# repositories:
11-
# - repository: self
12-
# type: git
13-
# ref: main
149
jobs:
1510
- job: cut_new_release_branch
1611
displayName: Agent phase
@@ -22,14 +17,11 @@ jobs:
2217
clean: true
2318
persistCredentials: True
2419
- task: PowerShell@2
25-
displayName: Bump up version
20+
displayName: Bump up version and cut a release branch
2621
inputs:
2722
filePath: .\build\bump_version.ps1
2823
arguments: .\dbops.psd1
29-
- task: PowerShell@2
30-
displayName: Cut a release branch
31-
inputs:
32-
filePath: .\build\git_release.ps1
3324
env:
3425
git_user_email: $(gitUserEmail)
35-
git_username: $(gitUsername)
26+
git_username: $(gitUsername)
27+
MY_ACCESS_TOKEN: $(System.AccessToken)

azure-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
- task: PowerShell@2
2525
displayName: Copy libraries
2626
inputs:
27-
filePath: .\copy_build_files.ps1
28-
arguments: .\dbops
27+
filePath: .\build\copy_build_files.ps1
2928
- task: PowerShell@2
3029
displayName: Create folder and move files to it
3130
inputs:
31+
targetType: inline
3232
script: |
3333
New-Item dbops -Type Directory
3434
Get-Item bin, functions, internal, *.ps*1, license.txt | Foreach-Object { Move-Item $_ .\dbops }

build/bump_version.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Param (
22
$Path = '.\dbops.psd1'
33
)
4+
git config --global user.email $env:git_user_email
5+
git config --global user.name $env:git_username
46
$moduleFile = Invoke-Command -ScriptBlock ([scriptblock]::Create((Get-Content $Path -Raw)))
57
$version = [Version]$moduleFile.ModuleVersion
68
$regEx = "^([\s]*ModuleVersion[\s]*\=[\s]*)\'(" + [regex]::Escape($version) + ")\'[\s]*`$"
@@ -15,4 +17,9 @@ if ($version -le $publishedVersion) {
1517
$content | Foreach-Object { $_ -replace $regEx, "`$1'$newVersion'" } | Out-File $Path -Force -Encoding utf8
1618
$newModuleFile = Invoke-Command -ScriptBlock ([scriptblock]::Create((Get-Content $Path -Raw)))
1719
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

build/git_release.ps1

Lines changed: 0 additions & 10 deletions
This file was deleted.

dbops.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
RootModule = 'dbops.psm1'
55

66
# Version number of this module.
7-
ModuleVersion = '0.6.5'
7+
ModuleVersion = '0.7.0'
88

99
# ID used to uniquely identify this module
1010
GUID = '16dff216-533a-4fa3-9b2e-4408dbe15e63'

0 commit comments

Comments
 (0)