[pull] master from Ehco1996:master#311
Merged
Merged
Conversation
…hco` (#441) * build: derive Version from git in Makefile so master builds aren't stale The Makefile only injected GitBranch/GitRevision/BuildTime via ldflags; Version came from the hardcoded "1.1.6" literal in internal/constant/constant.go, last bumped at the v1.1.6 release. Any master binary produced via `make build` (or anything that shells out to the Makefile) self-reported as 1.1.6 even when it was several commits ahead. That defeated the update command's nightly auto-detection: a post-1.1.6 master binary looked identical to released 1.1.6 and would either silently no-op or, in combination with the prerelease bug fixed in #440, get rolled backward. Compute a semver-valid VERSION from `git describe`: - on a stable tag exactly -> X.Y.Z - N commits past last stable tag -> X.Y.Z-dev.N+gSHA - no stable tag reachable -> falls back to the source default The output is valid semver (verified against golang.org/x/mod/semver), so the update command's compareVersions / channel detection treat it correctly: any -dev build auto-routes to the nightly channel and never gets downgraded to a strictly older stable. Also bump the source-default Version from 1.1.6 to 1.1.7-next so raw `go build cmd/ehco/main.go` (no Makefile, no goreleaser) on master still self-identifies as a nightly-channel build, matching the existing tag naming convention. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * build: pin VERSION to latest nightly tag instead of stable+dev.N The previous approach derived VERSION as `X.Y.Z-dev.N+gSHA` from the last stable tag. That doesn't match the project's nightly convention: master between v1.1.6 and v1.1.7 should self-report as `1.1.7-next` (matching the rolling nightly tag created by .github/workflows/nightly.yml), not `1.1.6-dev.8+g...`. Switch to: take the most recent reachable v*-next tag verbatim, fall back to the latest stable tag for the brief window between a release and the next nightly cron, then to the source default if no tags exist. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(cli): show help on bare \`ehco\` invocation instead of fataling Running \`ehco\` with no args, no -c config path, and no -l listen address used to fall through to startAction -> InitConfigAndComponents -> Fatalf("invalid listen"). Confusing for first-time users. Detect "no config source given" up front and print app help instead. Existing flows (-c config_file, -l/-r inline relay, env vars) are unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )