Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ release:
github:
owner: preminger
name: goctx

force_token: github
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.17.58] - 2026-09-16

### Added

- Added `force_token: github` to `.goreleaser.yaml`, so that it works even when multiple git hosts' tokens are set in the environment.

### Removed

- Bump `stave` to `v0.17.1`.
- Removed db-related leftovers from `stavefile.go`.

## [0.17.57] - 2026-09-15

### Changed
Expand Down Expand Up @@ -773,7 +784,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.4.0] - 2025-10-30

[unreleased]: https://github.com/preminger/goctx/compare/v0.17.57...HEAD
[unreleased]: https://github.com/preminger/goctx/compare/v0.17.58...HEAD
[0.17.58]: https://github.com/preminger/goctx/compare/v0.17.57...v0.17.58
[0.17.57]: https://github.com/preminger/goctx/compare/v0.17.56...v0.17.57
[0.17.56]: https://github.com/preminger/goctx/compare/v0.17.55...v0.17.56
[0.17.55]: https://github.com/preminger/goctx/compare/v0.17.54...v0.17.55
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/sebdah/goldie/v2 v2.8.0
github.com/spf13/cobra v1.10.2
github.com/stretchr/testify v1.12.1
github.com/yaklabco/stave v0.17.0
github.com/yaklabco/stave v0.17.1
golang.org/x/sync v0.23.0
golang.org/x/tools v0.50.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ github.com/xo/terminfo v1.2.0 h1:d0ZTOCpuGE0lwSAOs0zcJjwz3jWQyqcRt9XbGJpCOl4=
github.com/xo/terminfo v1.2.0/go.mod h1:lGzkSo8Fe7IRh/w+Gqz7n5mDog4FVXCj3gy/DYTBqio=
github.com/yaklabco/direnv/v2 v2.37.2-0.20260915190823-63179e7acdb7 h1:FbyprtPeV4uHT+z+g88+UAGVGGhlIkpoxDqY+Eoq3nI=
github.com/yaklabco/direnv/v2 v2.37.2-0.20260915190823-63179e7acdb7/go.mod h1:sJDi3wKT+98Gbbbr1fsSl5MccL8PxZbRK5X6sX5RpNo=
github.com/yaklabco/stave v0.17.0 h1:iibB663DzgFAgd8qfIu3iv9UCsgcsq3ZhkSXAwjB4Lw=
github.com/yaklabco/stave v0.17.0/go.mod h1:TLXQ0Gu5k3VXjHU9WDleL35ww9+IQ+8JEdTmhHvRY20=
github.com/yaklabco/stave v0.17.1 h1:d9bojTfzBXxfxo37Bstk/UMUA5LPusUW7vkZLTlRt3w=
github.com/yaklabco/stave v0.17.1/go.mod h1:TLXQ0Gu5k3VXjHU9WDleL35ww9+IQ+8JEdTmhHvRY20=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
Expand Down
15 changes: 7 additions & 8 deletions stavefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ const (

coverageOutFilename = "coverage.out"
coverageHTMLFilename = "coverage.html"

dbUpPollingInterval = 1 * time.Second
dbUpPollingTimeout = 20 * time.Second
)

var (
repoRoot string
devDBPath string
repoRoot string
)

func init() {
Expand All @@ -65,8 +61,6 @@ func init() {
if err != nil {
panic(fmt.Errorf("failed to get absolute path for repository root: %w", err))
}

devDBPath = filepath.Join(repoRoot, ".devdb")
}

// *********************************************************************
Expand Down Expand Up @@ -587,7 +581,12 @@ func (Test) Go(ctx context.Context) error {
group, _ := errgroup.WithContext(ctx)

group.Go(func() error {
defer pipeW.Close()
defer func(pipeW *io.PipeWriter) {
err := pipeW.Close()
if err != nil {
slog.Error("error closing pipe writer", "err", err)
}
}(pipeW)
slog.Debug("converting coverage output to JSON...")
if err := sh.Piper(nil, pipeW, os.Stderr, "go", "tool", "gocov", "convert", coverageOutFilename); err != nil {
return fmt.Errorf("error converting %q to JSON: %w", coverageOutFilename, err)
Expand Down