Skip to content

Commit

Permalink
fix: ๐Ÿ› release fix for windows binary match in update & scoop configs (โ€ฆ
Browse files Browse the repository at this point in the history
โ€ฆ#108)

<!--
copilot:all
-->
### <samp>๐Ÿค– Generated by Copilot at e4e22cc</samp>

### Summary
๐Ÿ›๐Ÿ› ๏ธ๐Ÿš€

<!--
1.  ๐Ÿ› for the bug fix in the Windows cli version update check issue.
2.  ๐Ÿ› ๏ธ for the improvement in the changelog management and formatting.
3.  ๐Ÿš€ for the enhancement in the cli release process and automation.
-->
This pull request improves the changelog management and the cli release
process. It adds more fields and labels to the `.changie.yaml` file,
fixes the `CHANGELOG.md` formatting, fixes the Windows download URLs and
version check issue, and automates the version bumping and release
messages.

> _The cli team has made some nice changes_
> _To fix bugs and bump up the ranges_
> _They updated `goreleaser`_
> _And `.changie` and `.changes`_
> _And polished the `CHANGELOG.md` pages_

### Walkthrough
* Add changelog entry for version 1.40.5 with bug fix for Windows cli
version update check issue
([link](https://github.com/DelineaXPM/dsv-cli/pull/108/files?diff=unified&w=0#diff-5aa94c1860f9a0c6253225ab149d7526b8580cda8b7902d209cf2d149e7aff2fR1-R5),
[link](https://github.com/DelineaXPM/dsv-cli/pull/108/files?diff=unified&w=0#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR9-R14))
* Update changie configuration to enable block input for change body,
add new labels and auto bump types for change kinds, and add newline
before each kind section in changelog
([link](https://github.com/DelineaXPM/dsv-cli/pull/108/files?diff=unified&w=0#diff-9f1c8d07b49e66598bb525c145a5d7524fef447d6993b72ccb378e70ebf922f3L9-R31),
[link](https://github.com/DelineaXPM/dsv-cli/pull/108/files?diff=unified&w=0#diff-9f1c8d07b49e66598bb525c145a5d7524fef447d6993b72ccb378e70ebf922f3L60-R53))
* Fix download URLs for Windows binaries in `goreleaser.mage.custom.go`
to match artifact names
([link](https://github.com/DelineaXPM/dsv-cli/pull/108/files?diff=unified&w=0#diff-c076ce5fd2767f4796c430f188621763ef386e733171e2f719fa9312c414a91cL300-R301))
* Change `Bump` function in `goreleaser.mage.custom.go` to use automatic
bump based on changie kinds instead of interactive select prompt
([link](https://github.com/DelineaXPM/dsv-cli/pull/108/files?diff=unified&w=0#diff-c076ce5fd2767f4796c430f188621763ef386e733171e2f719fa9312c414a91cL394-R394))
* Change `Bump` function in `goreleaser.mage.custom.go` to use
interactive text input for commit message instead of default message
([link](https://github.com/DelineaXPM/dsv-cli/pull/108/files?diff=unified&w=0#diff-c076ce5fd2767f4796c430f188621763ef386e733171e2f719fa9312c414a91cL418-R422))
  • Loading branch information
sheldonhull committed May 13, 2023
1 parent abb8faf commit c18d312
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 63 deletions.
5 changes: 5 additions & 0 deletions .changes/v1.40.5.md
@@ -0,0 +1,5 @@
## v1.40.5 - 2023-05-12

### ๐Ÿ› Bug Fix

- Windows cli version update check was looking for a binary with `windows` in the name, while the actual artifact is `win`.
66 changes: 18 additions & 48 deletions .changie.yaml
Expand Up @@ -6,38 +6,29 @@ versionExt: md
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '- {{ .Body -}}'
footerFormat: |
{{- $azureBoardsFixed := customs .Changes "azure-boards-workitemid-fixed" | compact | uniq }}
{{ $azureBoardsRelated := customs .Changes "azure-boards-workitemid-related" | compact | uniq }}
{{ $GitHubLinks := customs .Changes "github-link" | compact | uniq }}
{{ $GitHubContributors := customs .Changes "github-contributor" | compact | uniq -}}
### Related
{{ range $azureBoardsFixed }}
- fixes AB#{{.}}
{{- end -}}
{{ range $azureBoardsRelated }}
- related AB#{{.}}
{{- end -}}
{{ range $GitHubLinks }}
- <{{.}}>
{{- end }}
{{ with $GitHubContributors }}
### Contributors
{{ range $GitHubContributors }}
- [{{.}}](https://github.com/{{.}})
{{ end }}
{{ end }}
body:
block: true
kinds:
- label: ๐ŸŽ‰ Feature
- label: ๐Ÿ”จ Refactor
- label: ๐Ÿค– CI & Build
auto: patch
- label: ๐ŸŽ‰ New Product Feature
auto: minor
- label: โฌ‡๏ธ Deprecated
auto: minor
- label: ๐Ÿงช Tests
auto: patch
- label: ๐Ÿ”จ Refactor
auto: patch
- label: ๐Ÿ› Bug Fix
auto: patch
- label: ๐Ÿ”ฅ Breaking Change
auto: minor
- label: ๐Ÿ”’ Security
auto: patch
- label: โฌ†๏ธ Dependencies
- label: ๐Ÿค– Development
auto: patch
- label: ๐Ÿ”ฅ Major Version Change (Breaking Changes)
auto: major
newlines:
afterChange: 0
afterChangelogHeader: 1
Expand All @@ -57,27 +48,6 @@ newlines:
beforeFooterTemplate: 0
beforeHeaderFile: 0
beforeHeaderTemplate: 0
beforeKind: 0
beforeKind: 1
beforeVersion: 0
endOfVersion: 0

custom:
- key: github-contributor
type: string
minLength: 3
optional: true
- key: github-link
label: GitHub Link
type: string
minLength: 3
optional: true
- key: azure-boards-workitemid-fixed
label: FIXED Azure Boards WorkItem ID
type: int
minLength: 6
optional: true
- key: azure-boards-workitemid-related
label: Related Azure Boards WorkItem ID
type: int
minLength: 6
optional: true
12 changes: 6 additions & 6 deletions CHANGELOG.md
Expand Up @@ -6,14 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).

## v1.40.5 - 2023-05-12

### ๐Ÿ› Bug Fix

- Windows cli version update check was looking for a binary with `windows` in the name, while the actual artifact is `win`.

## v1.40.4 - 2023-04-25

### ๐ŸŽ‰ Feature

- `dsv pool list`: new `--limit`, `-l`, `--cursor` flags. See `dsv pool list --help` for more details.



### Related

- fixes AB#495586
Expand All @@ -24,9 +28,6 @@ and is generated by [Changie](https://github.com/miniscruff/changie).

- [andrii-zakurenyi](https://github.com/andrii-zakurenyi)




## v1.40.3 - 2023-04-04

### ๐Ÿ› Bug Fix
Expand Down Expand Up @@ -407,4 +408,3 @@ For developers, this contains a lot of changes related to CI, development workfl
- version command, i.e. `dsv --version`.
- top level command, i.e. `dsv`.
- dummy commands that simply print its help message, e.g. `dsv breakglass` or `dsv pki`.

19 changes: 10 additions & 9 deletions magefiles/goreleaser.mage.custom.go
Expand Up @@ -297,8 +297,8 @@ func (Release) GenerateCLIVersionFile() error {
DarwinArm64: fmt.Sprintf(constants.DownloadURLFString, ver, "dsv-darwin-arm64"),
LinuxAmd64: fmt.Sprintf(constants.DownloadURLFString, ver, "dsv-linux-x64"),
Linux386: fmt.Sprintf(constants.DownloadURLFString, ver, "dsv-linux-x86"),
WindowsAmd64: fmt.Sprintf(constants.DownloadURLFString, ver, "dsv-windows-x64.exe"),
Windows386: fmt.Sprintf(constants.DownloadURLFString, ver, "dsv-windows-x86.exe"),
WindowsAmd64: fmt.Sprintf(constants.DownloadURLFString, ver, "dsv-win-x64.exe"),
Windows386: fmt.Sprintf(constants.DownloadURLFString, ver, "dsv-win-x86.exe"),
},
}

Expand Down Expand Up @@ -391,11 +391,7 @@ func (Release) UploadCLIVersion() error {

// ๐Ÿ“ฆ Bump the application as an interactive command, prompting for semver change type, merging changelog, and running format and git add.
func (Release) Bump() error {
bumpType, _ := pterm.DefaultInteractiveSelect.
WithOptions([]string{"patch", "minor", "major"}).
Show()
pterm.Info.Printfln("bumping by: %s", bumpType)
if err := sh.RunV("changie", "batch", bumpType); err != nil {
if err := sh.RunV("changie", "batch", "auto"); err != nil {
pterm.Warning.Printf("changie batch failure (non-terminating as might be repeating batch command): %v", err)
}
if err := sh.RunV("changie", "merge"); err != nil {
Expand All @@ -415,8 +411,13 @@ func (Release) Bump() error {
if err != nil {
return err
}

if err := sh.RunV("git", "commit", "-m", fmt.Sprintf("feat: ๐Ÿš€ create release %s", releaseVersion)); err != nil {
response, err := pterm.DefaultInteractiveTextInput.
WithMultiLine(true).
WithDefaultText(fmt.Sprintf("feat: ๐Ÿš€ release %s", releaseVersion)).Show()
if err != nil {
return err
}
if err := sh.RunV("git", "commit", "-m", response); err != nil {
return err
}
return nil
Expand Down

0 comments on commit c18d312

Please sign in to comment.