fix(release): stamp notcrawl version

This commit is contained in:
Vincent Koc 2026-05-02 14:54:57 -07:00
parent 0a5e72c291
commit 29f30b9520
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ jobs:
depends_on "go" => :build
def install
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/notcrawl"
system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/notcrawl"
pkgshare.install "config.example.toml"
doc.install "README.md", "LICENSE", "SPEC.md"
end

View File

@ -31,7 +31,7 @@ jobs:
run: go test ./...
- name: Build CLI
run: go build -o bin/notcrawl ./cmd/notcrawl
run: go build -ldflags "-X main.version=ci" -o bin/notcrawl ./cmd/notcrawl
- name: Smoke test CLI control surface
run: |
@ -41,7 +41,7 @@ jobs:
printf '%s' "$output" | grep -q "Usage of notcrawl:"
printf '%s' "$output" | grep -q "metadata"
printf '%s' "$output" | grep -q "tui"
test -n "$(./bin/notcrawl --version)"
test "$(./bin/notcrawl --version)" = "ci"
./bin/notcrawl metadata --json | grep -q '"schema_version"'
cfg="$RUNNER_TEMP/notcrawl.toml"
db="$RUNNER_TEMP/notcrawl.db"

View File

@ -17,7 +17,7 @@ builds:
flags:
- -trimpath
ldflags:
- -s -w
- -s -w -X main.version={{ .Version }}
archives:
- id: bundles