Skip to content

Commit febfb9a

Browse files
authored
Merge pull request #41 from hymkor/push-kstqlxwpsomt
Improve Makefile and README
2 parents f94f311 + 24a3dd6 commit febfb9a

3 files changed

Lines changed: 15 additions & 18 deletions

File tree

Makefile

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ VERSION:=$(shell git describe --tags 2>$(NUL) || echo v0.0.0)
2121
GOOPT:=-ldflags "-s -w -X github.com/hymkor/sqlbless.Version=$(VERSION)"
2222
EXE=$(shell $(GO) env GOEXE)
2323

24-
all:
24+
build:
2525
$(GO) fmt ./...
26-
$(SET) "CGO_ENABLED=0" && $(GO) build $(GOOPT) && $(GO) build -C "$(CURDIR)/cmd/sqlbless" -o "$(CURDIR)/$(NAME)$(EXE)" $(GOOPT)
26+
$(SET) "CGO_ENABLED=0" && $(GO) build -C "$(CURDIR)/cmd/sqlbless" -o "$(CURDIR)" $(GOOPT)
2727

2828
test:
2929
$(GO) test -v ./...
3030

3131
_dist:
32-
$(MAKE) all
32+
$(SET) "CGO_ENABLED=0" && $(GO) build -C "$(CURDIR)/cmd/sqlbless" -o "$(CURDIR)" $(GOOPT)
3333
zip -9 $(NAME)-$(VERSION)-$(GOOS)-$(GOARCH).zip $(NAME)$(EXE)
3434

3535
dist:
@@ -42,22 +42,17 @@ clean:
4242
$(DEL) *.zip $(NAME)$(EXE)
4343

4444
manifest:
45-
make-scoop-manifest *-windows-*.zip > $(NAME).json
45+
$(GO) run github.com/hymkor/make-scoop-manifest@master -all *-windows-*.zip > $(NAME).json
4646

4747
release:
48-
pwsh -Command "latest-notes.ps1" | gh release create -d --notes-file - -t $(VERSION) $(VERSION) $(wildcard $(NAME)-$(VERSION)-*.zip)
49-
50-
get:
51-
$(GO) get -u
52-
$(GO) get golang.org/x/sys@v0.30.0
53-
# $(GO) get golang.org/x/text@v0.22.0
54-
$(GO) get golang.org/x/term@v0.29.0
55-
$(GO) get golang.org/x/exp@v0.0.0-20240531132922-fd00a4e0eefc
56-
$(GO) mod tidy
57-
# cd "$(CURDIR)/cmd/sqlbless" && $(GO) get -u && $(GO) mod tidy
48+
$(GO) run github.com/hymkor/latest-notes@latest | gh release create -d --notes-file - -t $(VERSION) $(VERSION) $(wildcard $(NAME)-$(VERSION)-*.zip)
5849

5950
docs:
60-
minipage -outline-in-sidebar -readme-to-index README.md > docs/index.html
61-
minipage -outline-in-sidebar -readme-to-index README_ja.md > docs/index_ja.html
51+
go run github.com/hymkor/minipage@latest -outline-in-sidebar -readme-to-index README.md > docs/index.html
52+
go run github.com/hymkor/minipage@latest -outline-in-sidebar -readme-to-index README_ja.md > docs/index_ja.html
53+
54+
readme:
55+
go run github.com/hymkor/example-into-readme@latest
56+
go run github.com/hymkor/example-into-readme@latest -target README_ja.md
6257

6358
.PHONY: all test dist _dist clean manifest release docs

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
SQL-Bless
22
===========
33

4-
<!-- badges.cmd | -->
4+
<!-- stdout:go run github.com/hymkor/example-into-readme/cmd/badges@latest -->
55
[![Go Test](https://github.com/hymkor/sqlbless/actions/workflows/go.yml/badge.svg)](https://github.com/hymkor/sqlbless/actions/workflows/go.yml)
66
[![License](https://img.shields.io/badge/License-MIT-red)](https://github.com/hymkor/sqlbless/blob/master/LICENSE)
77
[![Go Reference](https://pkg.go.dev/badge/github.com/hymkor/sqlbless.svg)](https://pkg.go.dev/github.com/hymkor/sqlbless)
8+
[![GitHub](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/hymkor/sqlbless)
89
<!-- -->
910

1011
**&lt;English&gt;** / [&lt;Japanese&gt;](./README_ja.md)

README_ja.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
SQL-Bless
22
=========
33

4-
<!-- badges.cmd | -->
4+
<!-- stdout:go run github.com/hymkor/example-into-readme/cmd/badges@latest -->
55
[![Go Test](https://github.com/hymkor/sqlbless/actions/workflows/go.yml/badge.svg)](https://github.com/hymkor/sqlbless/actions/workflows/go.yml)
66
[![License](https://img.shields.io/badge/License-MIT-red)](https://github.com/hymkor/sqlbless/blob/master/LICENSE)
77
[![Go Reference](https://pkg.go.dev/badge/github.com/hymkor/sqlbless.svg)](https://pkg.go.dev/github.com/hymkor/sqlbless)
8+
[![GitHub](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/hymkor/sqlbless)
89
<!-- -->
910

1011
[&lt;English&gt;](./README.md) / **&lt;Japanese&gt;**

0 commit comments

Comments
 (0)