-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now runs on GitHub Actions choose unique issue references in release notes generation Allow git_version to parse branch names when the current head is also associated with a tag multiple issue refs in commit messages are now de-deuplicated
- Loading branch information
Showing
11 changed files
with
366 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$temp_path | ||
) | ||
$ErrorActionPreference = 'Stop' | ||
$InformationPreference = 'Continue' | ||
|
||
. $PSScriptRoot/ci.ps1 | ||
. $PSScriptRoot/log.ps1 | ||
. $PSScriptRoot/exec.ps1 | ||
|
||
log "enable echo" "setup" | ||
Set-EchoOn | ||
|
||
log "set git credentials" | ||
exec { git config --global user.email "[email protected]" } | ||
exec { git config --global user.name "QUT Ecoacoustics" } | ||
|
||
|
||
log "import build variables" "import build variables" | ||
Get-Content "$temp_path/artifacts/AP_vars*/AP_vars.json" | ConvertFrom-Json | ForEach-Object { $_.Value | Set-Content $_.Path } | ||
Set-CiOutput "AP_Version" "${env:AP_Version}" | ||
Set-CiOutput "AP_CommitHash" "${env:AP_CommitHash}" | ||
|
||
log "the latest tag" | ||
git describe --abbrev=0 | ||
|
||
log "generate release notes" "generate release notes" | ||
./build/release_notes.ps1 "v${env:AP_Version}" "$temp_path/release_notes.txt" -update_changelog | ||
|
||
log "tag the release" "tag the release" | ||
# release notes assumes we haven't made the new tag yet, | ||
# we tag the version that the code was built against - not whatever commit is currently checked out! | ||
exec { git tag -a -m "Version ${env:AP_Version}" "v${env:AP_Version}" "${env:AP_CommitHash}" } | ||
|
||
log "save changes and push" "save changes and push" | ||
exec { git add CHANGELOG.md } | ||
exec { git commit -m "Update changelog for v${env:AP_Version}" -m "[skip ci]" } | ||
|
||
exec { git push --follow-tags } | ||
|
||
# debug | ||
log "list artifacts:" "debug" | ||
Get-ChildItem -Recurse "$temp_path/artifacts" | ||
|
||
log "print env" | ||
Get-ChildItem Env: | Format-Table | Write-Output | ||
|
||
log "git status" | ||
git status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.