Skip to content

Commit 553d7f1

Browse files
committed
bump version file and encoding issues
1 parent 2897f22 commit 553d7f1

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed

.gitattributes

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

dbops.psd1

-4.45 KB
Binary file not shown.

internal/json/dbops.json

-1.69 KB
Binary file not shown.

tests/etc/bump_version.ps1

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Param (
2+
$Path = '.\dbops.psd1'
3+
)
4+
#$path = '.\dbops.psd1'
5+
6+
$scriptBlock = [scriptblock]::Create((gc $path -Raw))
7+
$moduleFile = Invoke-Command -ScriptBlock $scriptBlock
8+
$version = [Version]$moduleFile.ModuleVersion
9+
$regEx = "^([\s]*ModuleVersion[\s]*\=[\s]*)\'(" + [regex]::Escape($version) + ")\'[\s]*`$"
10+
Write-Host "Current build $version"
11+
12+
if ($env:gitcommitmessage -notlike "*Bumping up version*") {
13+
[string]$newVersion = [Version]::new($version.Major, $version.Minor, ($version.Build + 1))
14+
Get-Content $Path | % { $_ -replace $regEx, "`$1'$newVersion'" } | Out-File $Path -Force
15+
$manifest = Test-ModuleManifest $Path -ErrorAction Stop
16+
Write-Host "New build $($manifest.Version)"
17+
}

tests/etc/full_config.json

-416 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)