Skip to content

Commit 8b08ea5

Browse files
committed
Fixed an issue where the version string was empty when built without GNU Make
1 parent af3119d commit 8b08ea5

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ manifest:
4747
release:
4848
$(GO) run github.com/hymkor/latest-notes@latest | gh release create -d --notes-file - -t $(VERSION) $(VERSION) $(wildcard $(NAME)-$(VERSION)-*.zip)
4949

50+
bump:
51+
$(GO) run github.com/hymkor/latest-notes@latest -suffix "-goinstall" -gosrc sqlbless release_note*.md > version.go
52+
5053
docs:
5154
$(GO) run github.com/hymkor/minipage@latest -outline-in-sidebar -readme-to-index README.md > docs/index.html
5255
$(GO) run github.com/hymkor/minipage@latest -outline-in-sidebar -readme-to-index README_ja.md > docs/index_ja.html
@@ -55,4 +58,4 @@ readme:
5558
$(GO) run github.com/hymkor/example-into-readme@latest
5659
$(GO) run github.com/hymkor/example-into-readme@latest -target README_ja.md
5760

58-
.PHONY: all test dist _dist clean manifest release docs
61+
.PHONY: all test dist _dist clean manifest release docs bump

main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,9 @@ func (cfg *Config) Bind(fs *flag.FlagSet) *Config {
5252
return cfg
5353
}
5454

55-
var Version string
56-
5755
func writeSignature(w io.Writer) {
5856
fmt.Fprintf(w, "# SQL-Bless %s-%s-%s built with %s\n",
59-
Version, runtime.GOOS, runtime.GOARCH, runtime.Version())
57+
version, runtime.GOOS, runtime.GOARCH, runtime.Version())
6058
}
6159

6260
func usage() {

version.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package sqlbless
2+
3+
var version = "v0.27.4-goinstall"

0 commit comments

Comments
 (0)