Skip to content

Commit

Permalink
generate-database: Move into cmd package
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Feb 12, 2025
1 parent f142442 commit fff9cce
Show file tree
Hide file tree
Showing 23 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ update-protobuf:

.PHONY: update-schema
update-schema:
cd internal/server/db/generate && $(GO) build -o $(GOPATH)/bin/incus-generate -tags "$(TAG_SQLITE3)" $(DEBUG) && cd -
cd cmd/generate-database && $(GO) build -o $(GOPATH)/bin/incus-generate -tags "$(TAG_SQLITE3)" $(DEBUG) && cd -
$(GO) generate ./...
gofmt -s -w ./internal/server/db/
goimports -w ./internal/server/db/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/spf13/cobra"

"github.com/lxc/incus/v6/internal/server/db/generate/db"
"github.com/lxc/incus/v6/internal/server/db/generate/file"
"github.com/lxc/incus/v6/internal/server/db/generate/lex"
"github.com/lxc/incus/v6/cmd/generate-database/db"
"github.com/lxc/incus/v6/cmd/generate-database/file"
"github.com/lxc/incus/v6/cmd/generate-database/lex"
)

// Return a new db command.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/lxc/incus/v6/internal/server/db/generate/lex"
"github.com/lxc/incus/v6/cmd/generate-database/lex"
"github.com/lxc/incus/v6/shared/util"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"slices"
"strings"

"github.com/lxc/incus/v6/internal/server/db/generate/lex"
"github.com/lxc/incus/v6/cmd/generate-database/lex"
"github.com/lxc/incus/v6/shared/util"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"path/filepath"
"strings"

"github.com/lxc/incus/v6/internal/server/db/generate/file"
"github.com/lxc/incus/v6/internal/server/db/generate/lex"
"github.com/lxc/incus/v6/cmd/generate-database/file"
"github.com/lxc/incus/v6/cmd/generate-database/lex"
"github.com/lxc/incus/v6/shared/util"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sort"
"strings"

"github.com/lxc/incus/v6/internal/server/db/generate/lex"
"github.com/lxc/incus/v6/cmd/generate-database/lex"
)

// Packages returns the AST packages in which to search for structs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/lxc/incus/v6/internal/server/db/generate/db"
"github.com/lxc/incus/v6/cmd/generate-database/db"
)

func TestPackages(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"path/filepath"
"strings"

"github.com/lxc/incus/v6/internal/server/db/generate/file"
"github.com/lxc/incus/v6/internal/server/db/generate/lex"
"github.com/lxc/incus/v6/cmd/generate-database/file"
"github.com/lxc/incus/v6/cmd/generate-database/lex"
)

// Stmt generates a particular database query statement.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"strings"

"github.com/lxc/incus/v6/internal/server/db/generate/lex"
"github.com/lxc/incus/v6/cmd/generate-database/lex"
)

// Reset an auto-generated source file, writing a new empty file header.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/lxc/incus/v6/internal/server/db/generate/lex"
"github.com/lxc/incus/v6/cmd/generate-database/lex"
)

func TestParse(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit fff9cce

Please sign in to comment.