Skip to content

Commit dd6d5f7

Browse files
committed
fix import path
1 parent 48821ef commit dd6d5f7

File tree

9 files changed

+32
-12
lines changed

9 files changed

+32
-12
lines changed

Makefile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
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+
113
.PHONY: compile
214
compile:
315
sqlc compile
@@ -6,6 +18,12 @@ compile:
618
generate: sqlc.yaml
719
sqlc generate
820

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+
927
.PHONY: clean
1028
clean:
1129
rm -rf ./_examples/gen
@@ -17,4 +35,4 @@ dist/sqlc-gen-python-orm.wasm.sha256: dist/sqlc-gen-python-orm.wasm
1735
openssl sha256 $< | awk '{print $$2}' > $@
1836

1937
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

plugin/main.go renamed to cmd/sqlc-gen-python-orm/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ package main
33
import (
44
"github.com/sqlc-dev/sqlc-go/codegen"
55

6-
python "github.com/sqlc-dev/sqlc-gen-python/internal"
6+
python "github.com/zztkm/sqlc-gen-python-orm/internal"
77
)
88

9+
const version = "0.0.1"
10+
911
func main() {
1012
codegen.Run(python.Generate)
1113
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/sqlc-dev/sqlc-gen-python
1+
module github.com/zztkm/sqlc-gen-python-orm
22

33
go 1.19
44

internal/gen.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"github.com/sqlc-dev/sqlc-go/metadata"
1515
"github.com/sqlc-dev/sqlc-go/sdk"
1616

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"
2121
)
2222

2323
type Constant struct {

internal/poet/builders.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package poet
22

3-
import "github.com/sqlc-dev/sqlc-gen-python/internal/ast"
3+
import "github.com/zztkm/sqlc-gen-python-orm/internal/ast"
44

55
func Alias(name string) *ast.Node {
66
return &ast.Node{

internal/poet/poet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package poet
22

33
import (
4-
"github.com/sqlc-dev/sqlc-gen-python/internal/ast"
4+
"github.com/zztkm/sqlc-gen-python-orm/internal/ast"
55
)
66

77
type proto interface {

internal/printer/printer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"strconv"
55
"strings"
66

7-
"github.com/sqlc-dev/sqlc-gen-python/internal/ast"
7+
"github.com/zztkm/sqlc-gen-python-orm/internal/ast"
88
)
99

1010
type writer struct {

internal/printer/printer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/google/go-cmp/cmp"
88

9-
"github.com/sqlc-dev/sqlc-gen-python/internal/ast"
9+
"github.com/zztkm/sqlc-gen-python-orm/internal/ast"
1010
)
1111

1212
type testcase struct {

sqlc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
- name: py
44
wasm:
55
url: file://dist/sqlc-gen-python-orm.wasm
6-
sha256: 25d1a43b594104740b8c368956944bfe5482d6ada35a3b2faf7dfd968917c9c9
6+
sha256: 314463b556cfc94852cdf6c69059be1148db6fa00977132df0d9ef99c8561cb8
77
sql:
88
- schema: "_examples/schema.sql"
99
queries: "_examples/query.sql"

0 commit comments

Comments
 (0)