Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
.PHONY: build deps lint test
.PHONY: build deps lint test work install

BINARY_NAME=sitectl-drupal
INSTALL_DIR ?= $(or $(dir $(shell which $(BINARY_NAME) 2>/dev/null)),/usr/local/bin/)

deps:
go get .
deps: work
go mod tidy

build: deps
go build -o $(BINARY_NAME) .

install: work build
sudo cp $(BINARY_NAME) $(INSTALL_DIR)$(BINARY_NAME)

lint:
go fmt ./...
golangci-lint run
Expand All @@ -22,3 +25,6 @@ lint:

test: build
go test -v -race ./...

work:
./scripts/use-go-work.sh
3 changes: 1 addition & 2 deletions cmd/backup.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"context"
"fmt"
"time"

Expand Down Expand Up @@ -58,7 +57,7 @@ Example:
cmdArgs = append(cmdArgs, extraFlag)
}

exitCode, err := sdk.ExecInContainerInteractive(context.Background(), containerName, cmdArgs)
exitCode, err := cli.ExecInteractive(cmd.Context(), containerName, cmdArgs)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/drush.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"context"
"fmt"

"github.com/kballard/go-shellquote"
Expand Down Expand Up @@ -41,7 +40,7 @@ Examples:
drushCmd := []string{"bash", "-c", fmt.Sprintf("drush %s", shellquote.Join(filteredArgs...))}

// Execute the command interactively using SDK helper
exitCode, err := sdk.ExecInContainerInteractive(context.Background(), containerName, drushCmd)
exitCode, err := cli.ExecInteractive(cmd.Context(), containerName, drushCmd)
if err != nil {
return err
}
Expand Down
Loading
Loading