Skip to content

chore: release prep — version injection, CHANGELOG (closes #49) - #72

Merged
oth-body merged 1 commit into
masterfrom
chore/release-prep
Sep 15, 2026
Merged

oth-body merged 1 commit into
masterfrom
chore/release-prep

Conversation

@oth-body

Copy link
Copy Markdown
Owner

Completes the remaining items from #49 (release preparation checklist).

Changes:

Already done (from prior work):
.goreleaser.yml, release.yml, ci.yml, LICENSE, README.md, .gitignore, config dir, tests

Closes #49

Resolves #49 by completing the remaining release preparation items.

What changed:
- version/commit/date are now vars (not const) so goreleaser's
  ldflags can inject them at build time. Plain 'go build' shows
  'hoot dev (commit none, built unknown)'; tagged releases show
  the real version, commit hash, and build date.
- 'hoot -version' output now includes commit and date.
- Added CHANGELOG.md covering all fixes from PRs #65-#71.
- Updated TestVersion to match the new output format.

What was already done (checked off in the issue):
- .goreleaser.yml with multi-platform builds + ldflags
- .github/workflows/release.yml (tag-triggered)
- .github/workflows/ci.yml (tests + cross-build matrix)
- LICENSE (MIT)
- README.md
- .gitignore (binary exclusions)
- Config dir uses 'hoot' (not 'nostr-cli')
- 9 test files across 3 packages

Closes #49
@oth-body
oth-body merged commit 5ae8fc1 into master Sep 15, 2026
7 checks passed
@oth-body
oth-body deleted the chore/release-prep branch September 15, 2026 01:40
oth-body pushed a commit that referenced this pull request Sep 15, 2026
Hoot's NIP-46 sign-in flow uses github.com/nbd-wtf/go-nostr's
nostr.RelayConnect, which delegates to net/http and therefore
honors HTTPS_PROXY / HTTP_PROXY / ALL_PROXY / SOCKS_PROXY env
vars inherited from the parent shell. If the user runs hoot
inside torsocks, a launcher that exports HTTPS_PROXY, or a shell
that already has Tor configured for monerod / curl, the wss://
dials to relay.damus.io / relay.nostr.band / nostr.wine (or
whatever the user picked) get routed through 127.0.0.1:9050.
When nothing is listening there — which is the typical case on
a workstation without an active Tor — every dial fails with
'dial tcp 127.0.0.1:9050: connect: connection refused', which
bubbles up as 'failed to connect to port 9050' in the TUI and
gives the user no actionable signal.

Fix it two ways:

  - nip46.ConnectRelays now refuses to dial at all when any
    *_PROXY env var is set, returning a clear error that names
    the offending env var and the proxy host:port. The user can
    either unset it (or run hoot outside torsocks). This matches
    what every other Nostr TUI does — nak, lume, etc. — none
    of them proxy wss:// connections by default.

  - Up-front validation of every configured relay URL (rejecting
    blanks and non-ws:// / non-wss:// schemes) so a misconfigured
    relays.txt surfaces a clear error instead of a confusing
    websocket one.

Anchored against master after PR #69 / #70 / #72 restructured
the NIP-46 dial path (RelayURL string -> RelayURLs []string,
WaitForConnection -> ConnectRelays + CheckConnection). Tests
updated accordingly: ConnectRelays is the new dial entry point,
and validateRelayURLs is exercised with single-bad-URL and
mixed-good-and-bad inputs.

Tests in nip46/nip46_test.go pin:
  - the proxy env var detection order (HTTPS_PROXY beats
    HTTP_PROXY beats ALL_PROXY; socks fallbacks come last)
  - that malformed or empty proxy values fall through to the
    next valid var (matching Go's stdlib httpproxy behaviour)
  - that ConnectRelays surfaces the env var name and port on
    the user-visible error path (this is the bug's regression
    guard)
  - that blank and non-wss relay URLs are rejected up front
    instead of producing a confusing websocket error later
  - that Session.Close is idempotent when no dial was attempted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Prepare for first release: Complete checklist and tasks

1 participant