diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dee9c59a211..6bcb7b97779 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -272,7 +272,7 @@ jobs: env: CGO_ENABLED: 0 run: | - go build -o bin ./incus-migrate + go build -o bin ./cmd/incus-migrate - name: Unit tests (client) env: diff --git a/Makefile b/Makefile index 920b035cd24..11196921942 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ ifeq "$(TAG_SQLITE3)" "" endif CC="$(CC)" CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" go install -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./... - CGO_ENABLED=0 go install -v -tags netgo ./incus-migrate + CGO_ENABLED=0 go install -v -tags netgo ./cmd/incus-migrate CGO_ENABLED=0 go install -v -tags agent,netgo ./incus-agent @echo "Incus built successfully" @@ -47,7 +47,7 @@ incus-agent: .PHONY: incus-migrate incus-migrate: - CGO_ENABLED=0 go install -v -tags netgo ./incus-migrate + CGO_ENABLED=0 go install -v -tags netgo ./cmd/incus-migrate @echo "Incus migration tool built successfully" .PHONY: incus-doc @@ -158,7 +158,7 @@ ifeq "$(TAG_SQLITE3)" "" endif CC="$(CC)" CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" go install -v -tags "$(TAG_SQLITE3) logdebug" $(DEBUG) ./... - CGO_ENABLED=0 go install -v -tags "netgo,logdebug" ./incus-migrate + CGO_ENABLED=0 go install -v -tags "netgo,logdebug" ./cmd/incus-migrate CGO_ENABLED=0 go install -v -tags "agent,netgo,logdebug" ./incus-agent @echo "Incus built successfully" @@ -170,7 +170,7 @@ ifeq "$(TAG_SQLITE3)" "" endif CC="$(CC)" CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" go install -a -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./... - CGO_ENABLED=0 go install -a -v -tags netgo ./incus-migrate + CGO_ENABLED=0 go install -a -v -tags netgo ./cmd/incus-migrate CGO_ENABLED=0 go install -a -v -tags agent,netgo ./incus-agent @echo "Incus built successfully" @@ -181,7 +181,7 @@ ifeq "$(TAG_SQLITE3)" "" endif CC="$(CC)" CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" go install -race -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./... - CGO_ENABLED=0 go install -v -tags netgo ./incus-migrate + CGO_ENABLED=0 go install -v -tags netgo ./cmd/incus-migrate CGO_ENABLED=0 go install -v -tags agent,netgo ./incus-agent @echo "Incus built successfully" diff --git a/fuidshift/main.go b/cmd/fuidshift/main.go similarity index 100% rename from fuidshift/main.go rename to cmd/fuidshift/main.go diff --git a/fuidshift/main_shift.go b/cmd/fuidshift/main_shift.go similarity index 100% rename from fuidshift/main_shift.go rename to cmd/fuidshift/main_shift.go diff --git a/incus-migrate/cgo.go b/cmd/incus-migrate/cgo.go similarity index 100% rename from incus-migrate/cgo.go rename to cmd/incus-migrate/cgo.go diff --git a/incus-migrate/main.go b/cmd/incus-migrate/main.go similarity index 100% rename from incus-migrate/main.go rename to cmd/incus-migrate/main.go diff --git a/incus-migrate/main_migrate.go b/cmd/incus-migrate/main_migrate.go similarity index 100% rename from incus-migrate/main_migrate.go rename to cmd/incus-migrate/main_migrate.go diff --git a/incus-migrate/main_netcat.go b/cmd/incus-migrate/main_netcat.go similarity index 100% rename from incus-migrate/main_netcat.go rename to cmd/incus-migrate/main_netcat.go diff --git a/incus-migrate/transfer.go b/cmd/incus-migrate/transfer.go similarity index 100% rename from incus-migrate/transfer.go rename to cmd/incus-migrate/transfer.go diff --git a/incus-migrate/utils.go b/cmd/incus-migrate/utils.go similarity index 100% rename from incus-migrate/utils.go rename to cmd/incus-migrate/utils.go diff --git a/incus-user/incus.go b/cmd/incus-user/incus.go similarity index 100% rename from incus-user/incus.go rename to cmd/incus-user/incus.go diff --git a/incus-user/main.go b/cmd/incus-user/main.go similarity index 100% rename from incus-user/main.go rename to cmd/incus-user/main.go diff --git a/incus-user/main_daemon.go b/cmd/incus-user/main_daemon.go similarity index 100% rename from incus-user/main_daemon.go rename to cmd/incus-user/main_daemon.go diff --git a/incus-user/proxy.go b/cmd/incus-user/proxy.go similarity index 100% rename from incus-user/proxy.go rename to cmd/incus-user/proxy.go diff --git a/lxc-to-incus/config.go b/cmd/lxc-to-incus/config.go similarity index 100% rename from lxc-to-incus/config.go rename to cmd/lxc-to-incus/config.go diff --git a/lxc-to-incus/main.go b/cmd/lxc-to-incus/main.go similarity index 100% rename from lxc-to-incus/main.go rename to cmd/lxc-to-incus/main.go diff --git a/lxc-to-incus/main_migrate.go b/cmd/lxc-to-incus/main_migrate.go similarity index 100% rename from lxc-to-incus/main_migrate.go rename to cmd/lxc-to-incus/main_migrate.go diff --git a/lxc-to-incus/main_migrate_test.go b/cmd/lxc-to-incus/main_migrate_test.go similarity index 100% rename from lxc-to-incus/main_migrate_test.go rename to cmd/lxc-to-incus/main_migrate_test.go diff --git a/lxc-to-incus/main_netcat.go b/cmd/lxc-to-incus/main_netcat.go similarity index 100% rename from lxc-to-incus/main_netcat.go rename to cmd/lxc-to-incus/main_netcat.go diff --git a/lxc-to-incus/network.go b/cmd/lxc-to-incus/network.go similarity index 100% rename from lxc-to-incus/network.go rename to cmd/lxc-to-incus/network.go diff --git a/lxc-to-incus/transfer.go b/cmd/lxc-to-incus/transfer.go similarity index 100% rename from lxc-to-incus/transfer.go rename to cmd/lxc-to-incus/transfer.go diff --git a/lxc-to-incus/utils.go b/cmd/lxc-to-incus/utils.go similarity index 100% rename from lxc-to-incus/utils.go rename to cmd/lxc-to-incus/utils.go