File tree 3 files changed +25
-16
lines changed 3 files changed +25
-16
lines changed Original file line number Diff line number Diff line change 35
35
}
36
36
}
37
37
38
- $GitHubUser = ' nicholasdille'
39
- $GitHubRepository = ' PowerShell-Statistics'
40
- $NoDraft = $true
41
- $Release = $true
42
- $RequestBody = @ {
43
- " tag_name" = " $Version "
44
- " target_commitish" = " $Branch "
45
- " name" = " Version $Version "
46
- " body" = " $Description "
47
- " draft" = -Not $NoDraft
48
- " prerelease" = -Not $Release
49
- } | ConvertTo-Json
50
- $Result = Invoke-WebRequest - Method Post - Uri " https://api.github.com/repos/$GitHubUser /$GitHubRepository /releases" - Headers @ {Authorization = " token $ENV: GitHubToken " } - Body $RequestBody
51
- $Result
38
+ if (Test-Path - Path " $ProjectRoot \ModuleVersion.txt" ) {
39
+ $GitHubUser = ' nicholasdille'
40
+ $GitHubRepository = ' PowerShell-Statistics'
41
+ $GitHubBranch = ' master'
42
+ $Version = Get-Content - Path " $ProjectRoot \ModuleVersion.txt"
43
+ $Description = ' '
44
+ $NoDraft = $true
45
+ $Release = $true
46
+ $RequestBody = @ {
47
+ " tag_name" = " $Version "
48
+ " target_commitish" = " $GitHubBranch "
49
+ " name" = " Version $Version "
50
+ " body" = " $Description "
51
+ " draft" = -Not $NoDraft
52
+ " prerelease" = -Not $Release
53
+ } | ConvertTo-Json
54
+ $Result = Invoke-WebRequest - Method Post - Uri " https://api.github.com/repos/$GitHubUser /$GitHubRepository /releases" - Headers @ {Authorization = " token $ENV: GitHubToken " } - Body $RequestBody
55
+ $Result
56
+ }
52
57
}
53
58
else
54
59
{
Original file line number Diff line number Diff line change @@ -80,9 +80,13 @@ Task Build -Depends Test,Docs {
80
80
$scriptBlock.CheckRestrictedLanguage ($allowedCommands , $allowedVariables , $true )
81
81
$manifest = & $scriptBlock
82
82
83
+ $ModuleVersion = $manifest.ModuleVersion
83
84
If ($ENV: BHBuildSystem -eq ' AppVeyor' ) {
84
- Update-Metadata - Path $env: BHPSModuleManifest - PropertyName ModuleVersion - Value " $ ( $manifest.ModuleVersion ) .$env: APPVEYOR_BUILD_NUMBER " - ErrorAction stop
85
+ Update-Metadata - Path $env: BHPSModuleManifest - PropertyName ModuleVersion - Value " $ModuleVersion .$env: APPVEYOR_BUILD_NUMBER " - ErrorAction stop
86
+ $ModuleVersion = " $ModuleVersion .$env: APPVEYOR_BUILD_NUMBER "
85
87
}
88
+
89
+ Set-Content - Path " $ProjectRoot \ModuleVersion.txt" - Value $ModuleVersion
86
90
}
87
91
88
92
Task Deploy - Depends Build {
Original file line number Diff line number Diff line change 1
- # 1.1.60
1
+ # 1.1.61
2
2
3
3
- Improved check for data via parameter or pipeline
4
4
- Added automatic creation of GitHub release
You can’t perform that action at this time.
0 commit comments