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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

# --- build output ---
/bin/
/dist/
# at any depth: a test that forgets a temp DistDir writes ./dist beside its
# package, and that output was committed once (apps/volt/release/dist)
dist/
/tmp/
# `go build` inside a module dir drops a binary named after that dir
apps/cli/cli
Expand Down
1 change: 0 additions & 1 deletion apps/volt/release/dist/checksums.txt

This file was deleted.

Binary file not shown.
9 changes: 7 additions & 2 deletions apps/volt/release/release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,13 @@ func TestFromTagKeepsBrewChannel(t *testing.T) {
mustGit(t, root, "add", ".")
mustGit(t, root, "commit", "-q", "-m", "brew cfg")
pushed := ""
// An explicit temp DistDir, for both runs: without one the build writes
// ./dist inside this package's source directory, and that output was
// once committed. Every `go test` then rewrote tracked files, left the
// tree dirty, and made the next `volt release` refuse.
dist := filepath.Join(t.TempDir(), "dist")
o := Options{
Root: root, Dir: "cmd/notes", Version: "v1.0.0", Publisher: newFakePub(),
Root: root, Dir: "cmd/notes", Version: "v1.0.0", Publisher: newFakePub(), DistDir: dist,
PushFormula: func(tap, binary, formula, message string) error { pushed = tap; return nil },
}
if _, err := Run(o); err != nil {
Expand All @@ -733,7 +738,7 @@ func TestFromTagKeepsBrewChannel(t *testing.T) {
// The republish path: NO Brew in Options — must come from the dir's cfg.
pushed = ""
o2 := Options{
Root: root, FromTag: "notes/v1.0.0", Publisher: newFakePub(), SkipTests: true,
Root: root, FromTag: "notes/v1.0.0", Publisher: newFakePub(), SkipTests: true, DistDir: dist,
PushFormula: func(tap, binary, formula, message string) error { pushed = tap; return nil },
}
if _, err := Run(o2); err != nil {
Expand Down
Loading