diff --git a/.goreleaser.yml b/.goreleaser.yml index 8d7a0c9..0133fab 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,6 @@ builds: - binary: cage - main: ./cli/cage/*.go + main: ./cli/cage/main.go goos: - darwin - linux diff --git a/cli/cage/rollout.go b/cli/cage/commands/rollout.go similarity index 99% rename from cli/cage/rollout.go rename to cli/cage/commands/rollout.go index 0c15b87..2f559e6 100644 --- a/cli/cage/rollout.go +++ b/cli/cage/commands/rollout.go @@ -1,18 +1,18 @@ -package main +package commands import ( - "github.com/urfave/cli" - "github.com/loilo-inc/canarycage" "encoding/json" "fmt" - "os" - "io/ioutil" - "github.com/aws/aws-sdk-go/aws" "github.com/apex/log" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ecs" "github.com/aws/aws-sdk-go/service/cloudwatch" + "github.com/aws/aws-sdk-go/service/ecs" "github.com/aws/aws-sdk-go/service/elbv2" + "github.com/loilo-inc/canarycage" + "github.com/urfave/cli" + "io/ioutil" + "os" ) func RollOutCommand() cli.Command { diff --git a/cli/cage/up.go b/cli/cage/commands/up.go similarity index 99% rename from cli/cage/up.go rename to cli/cage/commands/up.go index 554e8bb..0f65ef2 100644 --- a/cli/cage/up.go +++ b/cli/cage/commands/up.go @@ -1,4 +1,4 @@ -package main +package commands import ( "encoding/json" diff --git a/cli/cage/main.go b/cli/cage/main.go index ae1e3cb..a295d59 100644 --- a/cli/cage/main.go +++ b/cli/cage/main.go @@ -3,6 +3,7 @@ package main import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" + "github.com/loilo-inc/canarycage/cli/cage/commands" "github.com/urfave/cli" "log" "os" @@ -21,8 +22,8 @@ func main() { app.Version = "1.2.1" app.Description = "A gradual roll-out deployment tool for AWS ECS" app.Commands = cli.Commands{ - RollOutCommand(), - UpCommand(ses), + commands.RollOutCommand(), + commands.UpCommand(ses), } app.Run(os.Args) }