check / check (push) Waiting to run
Takes .golangci.yml, .dockerignore, .gitignore, .editorconfig, the workflow and REPO_POLICIES.md from sneak/prompts dd4027b, keeping this repository's own entries after the shared content. Lint (golangci-lint v2.14.0) and test become Dockerfile phases that script/lint and script/test build alone and uncached; the image build depends on both, and script/cibuild bootstraps, runs script/check, then builds the image. The agent guidance file moves to AGENTS.md. The Go code is fixed for what the new configuration finds; reads that iterate rows now also report an iteration error. Model: opus-5-5
36 lines
935 B
Go
36 lines
935 B
Go
// Package version provides build version information
|
|
package version
|
|
|
|
// Build-time variables set via ldflags
|
|
//
|
|
//nolint:gochecknoglobals // variables so that ldflags can set them at build time
|
|
var (
|
|
// GitRevision is the git commit hash
|
|
GitRevision = "unknown"
|
|
// GitRevisionShort is the version the page footer shows: the tag or
|
|
// short commit hash from `git describe --tags --always`
|
|
GitRevisionShort = "unknown"
|
|
)
|
|
|
|
const (
|
|
// Name is the program name
|
|
Name = "routewatch"
|
|
// Author is the program author
|
|
Author = "@sneak"
|
|
// AuthorURL is the author's website
|
|
AuthorURL = "https://sneak.berlin"
|
|
// License is the program license
|
|
License = "WTFPL"
|
|
// RepoURL is the git repository URL
|
|
RepoURL = "https://git.eeqj.de/sneak/routewatch"
|
|
)
|
|
|
|
// CommitURL returns the URL to view the current commit
|
|
func CommitURL() string {
|
|
if GitRevision == "unknown" {
|
|
return RepoURL
|
|
}
|
|
|
|
return RepoURL + "/commit/" + GitRevision
|
|
}
|