File tree Expand file tree Collapse file tree 9 files changed +32
-12
lines changed Expand file tree Collapse file tree 9 files changed +32
-12
lines changed Original file line number Diff line number Diff line change
1
+ VERSION := $$(make -s show-version )
2
+ CURRENT_REVISION := $(shell git rev-parse --short HEAD)
3
+ BUILD_LDFLAGS := "-s -w -X main.revision=$(CURRENT_REVISION ) "
4
+ GOBIN ?= $(shell go env GOPATH) /bin
5
+
6
+ .PHONY : show-version
7
+ show-version : $(GOBIN ) /gobump
8
+ @gobump show -r .
9
+
10
+ $(GOBIN ) /gobump :
11
+ @go install github.com/x-motemen/gobump/cmd/gobump@latest
12
+
1
13
.PHONY : compile
2
14
compile :
3
15
sqlc compile
@@ -6,6 +18,12 @@ compile:
6
18
generate : sqlc.yaml
7
19
sqlc generate
8
20
21
+
22
+ .PHONY : release
23
+ release : dist/sqlc-gen-ts-d1.wasm dist/sqlc-gen-ts-d1.wasm.sha256
24
+ gh release delete -y --cleanup-tag v0.0.0-a
25
+ gh release create v0.0.0-a dist/sqlc-gen-ts-d1.wasm dist/sqlc-gen-ts-d1.wasm.sha256
26
+
9
27
.PHONY : clean
10
28
clean :
11
29
rm -rf ./_examples/gen
@@ -17,4 +35,4 @@ dist/sqlc-gen-python-orm.wasm.sha256: dist/sqlc-gen-python-orm.wasm
17
35
openssl sha256 $< | awk ' {print $$2}' > $@
18
36
19
37
dist/sqlc-gen-python-orm.wasm : internal/*
20
- GOOS=wasip1 GOARCH=wasm go build -o ./dist /sqlc-gen-python-orm.wasm ./plugin /main.go
38
+ GOOS=wasip1 GOARCH=wasm go build -o $@ ./cmd /sqlc-gen-python-orm/main.go
Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ package main
3
3
import (
4
4
"github.com/sqlc-dev/sqlc-go/codegen"
5
5
6
- python "github.com/sqlc-dev /sqlc-gen-python/internal"
6
+ python "github.com/zztkm /sqlc-gen-python-orm /internal"
7
7
)
8
8
9
+ const version = "0.0.1"
10
+
9
11
func main () {
10
12
codegen .Run (python .Generate )
11
13
}
Original file line number Diff line number Diff line change 1
- module github.com/sqlc-dev /sqlc-gen-python
1
+ module github.com/zztkm /sqlc-gen-python-orm
2
2
3
3
go 1.19
4
4
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ import (
14
14
"github.com/sqlc-dev/sqlc-go/metadata"
15
15
"github.com/sqlc-dev/sqlc-go/sdk"
16
16
17
- pyast "github.com/sqlc-dev /sqlc-gen-python/internal/ast"
18
- "github.com/sqlc-dev /sqlc-gen-python/internal/inflection"
19
- "github.com/sqlc-dev /sqlc-gen-python/internal/poet"
20
- pyprint "github.com/sqlc-dev /sqlc-gen-python/internal/printer"
17
+ pyast "github.com/zztkm /sqlc-gen-python-orm /internal/ast"
18
+ "github.com/zztkm /sqlc-gen-python-orm /internal/inflection"
19
+ "github.com/zztkm /sqlc-gen-python-orm /internal/poet"
20
+ pyprint "github.com/zztkm /sqlc-gen-python-orm /internal/printer"
21
21
)
22
22
23
23
type Constant struct {
Original file line number Diff line number Diff line change 1
1
package poet
2
2
3
- import "github.com/sqlc-dev /sqlc-gen-python/internal/ast"
3
+ import "github.com/zztkm /sqlc-gen-python-orm /internal/ast"
4
4
5
5
func Alias (name string ) * ast.Node {
6
6
return & ast.Node {
Original file line number Diff line number Diff line change 1
1
package poet
2
2
3
3
import (
4
- "github.com/sqlc-dev /sqlc-gen-python/internal/ast"
4
+ "github.com/zztkm /sqlc-gen-python-orm /internal/ast"
5
5
)
6
6
7
7
type proto interface {
Original file line number Diff line number Diff line change 4
4
"strconv"
5
5
"strings"
6
6
7
- "github.com/sqlc-dev /sqlc-gen-python/internal/ast"
7
+ "github.com/zztkm /sqlc-gen-python-orm /internal/ast"
8
8
)
9
9
10
10
type writer struct {
Original file line number Diff line number Diff line change 6
6
7
7
"github.com/google/go-cmp/cmp"
8
8
9
- "github.com/sqlc-dev /sqlc-gen-python/internal/ast"
9
+ "github.com/zztkm /sqlc-gen-python-orm /internal/ast"
10
10
)
11
11
12
12
type testcase struct {
Original file line number Diff line number Diff line change 3
3
- name : py
4
4
wasm :
5
5
url : file://dist/sqlc-gen-python-orm.wasm
6
- sha256 : 25d1a43b594104740b8c368956944bfe5482d6ada35a3b2faf7dfd968917c9c9
6
+ sha256 : 314463b556cfc94852cdf6c69059be1148db6fa00977132df0d9ef99c8561cb8
7
7
sql :
8
8
- schema : " _examples/schema.sql"
9
9
queries : " _examples/query.sql"
You can’t perform that action at this time.
0 commit comments