-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-version.ps1
More file actions
29 lines (25 loc) · 815 Bytes
/
update-version.ps1
File metadata and controls
29 lines (25 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<#
.SYNOPSIS
.DESCRIPTION
#>
function Update-Version {
[CmdletBinding()]
param(
)
process {
$project = Get-BuildEnvironment -Path $PSScriptRoot
$project
Step-ModuleVersion -Path $project.PSModuleManifest -By Patch
$file = Get-GitChangedFile -Path $project.ProjectPath
$file.foreach(
{
Invoke-Git -Path $project.Projectpath -GitPath (gcm git.exe) -Arguments "add $file"
}
)
$meta = Get-MetaData -Path $project.PSModuleManifest
$meta
Invoke-Git -Path $project.Projectpath -GitPath (gcm git.exe) -Arguments "commit -m ""Update to version ${meta}"""
Invoke-Git -Path $project.Projectpath -GitPath (gcm git.exe) -Arguments "tag $meta ${project.commithash}"
}
}
Update-Version