Skip to content

Commit 65a9605

Browse files
committed
tinker with the release notes
1 parent a339c98 commit 65a9605

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ jobs:
3535
# Use the latest v2 GoReleaser version. The 'notes_file' option
3636
# in .goreleaser.yml requires GoReleaser v2.0.0 or newer.
3737
version: '~> v2'
38-
# The '--clean' flag removes the 'dist' directory before building
39-
args: release --clean
38+
# The '--clean' flag removes the 'dist' directory before building.
39+
# We pass the release notes file via CLI flag, as the config file option is a pro feature.
40+
args: release --clean --release-notes-file release-notes.md
4041
env:
4142
# This token is provided by GitHub automatically and is required
4243
# to create a release and upload assets.

.goreleaser.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,4 @@ checksum:
4444
name_template: 'checksums.txt'
4545

4646
snapshot:
47-
name_template: "{{ incpatch .Version }}-next"
48-
49-
release:
50-
# Use the release-notes.md file generated in the GitHub Actions workflow
51-
# as the content for the GitHub release.
52-
notes:
53-
from_file: "release-notes.md"
47+
name_template: "{{ incpatch .Version }}-next"

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **Import Command:** The `import` command now provides more detailed feedback, reporting errors for invalid key lines instead of skipping them silently.
1313

1414
### Fixed
15-
- **GoReleaser Configuration:** Corrected the `release` section in `.goreleaser.yml` to be compatible with GoReleaser v2, resolving release failures.
15+
- **GoReleaser Workflow:** The release workflow now passes release notes via a CLI flag (`--release-notes-file`) to avoid using a GoReleaser Pro feature, fixing release failures.
16+
- **Configuration Discovery:** Keymaster now prints a message when it automatically creates a default `.keymaster.yaml` file, improving user feedback on first run.
1617
- **CLI Parsing:** Improved argument parsing in the `trust-host` command for consistency and robustness.
1718
- **Deployment Compatibility:** The SFTP deployment logic now uses a backup-and-rename strategy, improving compatibility with SFTP servers that do not support atomic overwrites (e.g., on Windows).
1819
- **Build Failures:** Resolved two separate build failures: one caused by a function being redeclared, and another by a package import conflict in `main.go`.

cmd/keymaster/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ database:
136136
`
137137
// If writing fails (e.g., due to permissions), we don't treat it as a
138138
// fatal error. The app will simply run with the default values set in memory.
139-
_ = os.WriteFile(defaultConfigPath, []byte(defaultContent), 0644)
139+
if err := os.WriteFile(defaultConfigPath, []byte(defaultContent), 0644); err == nil {
140+
fmt.Println("No config file found. Created a default '.keymaster.yaml' in the current directory.")
141+
}
140142
}
141143
}
142144
}

0 commit comments

Comments
 (0)