Permalink
Browse files

Remove everything CLI-related

  • Loading branch information...
1 parent d5ae02a commit 42404636b9dd21d282da65c2bcb27a71fd7084d5 @cloudhead cloudhead committed Dec 5, 2012
View
@@ -1,59 +1,9 @@
MAJOR := 0
-MINOR := 7
-PATCH := 4
+MINOR := 8
+PATCH := 0
VERSION := $(MAJOR).$(MINOR).$(PATCH)
-GOPATH ?= $(PWD)
-GOBIN ?= $(GOPATH)/bin
LDFLAGS := -ldflags "-X main.VERSION $(VERSION)"
-GOFLAGS := -x $(LDFLAGS)
-PKGPATH := $(GOPATH)/src/github.com/soundcloud/visor
-GOARCH ?= amd64
-
-# LOCAL #
default:
- @go build $(LDFLAGS) ./cmd/visor
- @echo built ./visor v$(VERSION)
-
-install: $(PKGPATH)
- GOPATH=$(GOPATH) go get $(GOFLAGS) -d ./cmd/visor
- GOPATH=$(GOPATH) GOBIN=$(GOBIN) go install $(GOFLAGS) ./cmd/visor
- @echo "built $(GOBIN)/visor v$(VERSION)"
-
-$(PKGPATH):
- mkdir -p $(shell dirname $(PKGPATH))
- ln -sf $(PWD) $(PKGPATH)
-
-test:
- go test
-
-# DIST #
-
-dist: linux darwin
-
-linux darwin:
- GOOS=$@ CGO_ENABLED=0 GOARCH=$(GOARCH) go build $(LDFLAGS) -o bin/$@/visor ./cmd/visor
- cd bin/$@ && tar -caf visor-v$(VERSION)-$@.tar.gz visor
-
-# DEBIAN PACKAGING #
-
-DEB_NAME=visor
-DEB_URL=http://github.com/soundcloud/visor
-DEB_VERSION=$(VERSION)
-DEB_DESCRIPTION=A command line interface for visor
-DEB_MAINTAINER=Daniel Bornkessel <daniel@soundcloud.com>
-
-include deb.mk
-
-debroot:
- GOBIN=$(DEB_ROOT)/usr/bin $(MAKE) install
-
-# BUILD #
-
-build: clean debroot debbuild
-
-clean: debclean
- GOPATH=$(GOPATH) go clean
- rm -rf bin src pkg
+ go build $(LDFLAGS)
-.PHONY: test
View
@@ -122,16 +122,6 @@ func main() {
./make.sh
go install
-#### Installation
-
-Debian in our internal network:
-
- apt-get install visor
-
-Compile yourself:
-
- * install [golang](http://golang.org) and `make install`
-
### Testing
First start `doozerd` with default configuration. Then run:
View
@@ -1,44 +0,0 @@
-// Copyright (c) 2012, SoundCloud Ltd.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-// Source code and contact info at http://github.com/soundcloud/visor
-
-package main
-
-import (
- "fmt"
- "github.com/soundcloud/visor"
- "os"
-)
-
-var cmdAppDescribe = &Command{
- Name: "app-describe",
- Short: "shows app info",
- UsageLine: "app-describe <name>",
- Long: `
-App-describe returns meta information for the appliation given.
- `,
-}
-
-func init() {
- cmdAppDescribe.Run = runAppDescribe
-}
-
-func runAppDescribe(cmd *Command, args []string) {
- if len(args) < 1 {
- cmd.Flag.Usage()
- }
-
- s := cmdAppDescribe.Snapshot
-
- app, err := visor.GetApp(s, args[0])
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error fetching app %s\n", err.Error())
- os.Exit(1)
- }
-
- fmt.Fprintf(os.Stdout, "name: %s\n", app.Name)
- fmt.Fprintf(os.Stdout, "type: %s\n", app.DeployType)
- fmt.Fprintf(os.Stdout, "repo: %s\n", app.RepoUrl)
- fmt.Fprintf(os.Stdout, "stack: %s\n", app.Stack)
-}
View
@@ -1,47 +0,0 @@
-// Copyright (c) 2012, SoundCloud Ltd.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-// Source code and contact info at http://github.com/soundcloud/visor
-
-package main
-
-import (
- "fmt"
- "github.com/soundcloud/visor"
- "os"
-)
-
-var cmdAppEnvDel = &Command{
- Name: "app-env-del",
- Short: "delete environment variable",
- UsageLine: "app-env-del <app> <key>",
- Long: `
-App-env-del removes a value for the given key in the application environment.
- `,
-}
-
-func init() {
- cmdAppEnvDel.Run = runAppEnvDel
-}
-
-func runAppEnvDel(cmd *Command, args []string) {
- if len(args) < 2 {
- cmd.Flag.Usage()
- }
-
- s := cmdAppEnvDel.Snapshot
- name := args[0]
- key := args[1]
-
- app, err := visor.GetApp(s, name)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error fetching app %s\n", err.Error())
- os.Exit(1)
- }
-
- _, err = app.DelEnvironmentVar(key)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error removing env var %s\n", err.Error())
- os.Exit(1)
- }
-}
View
@@ -1,61 +0,0 @@
-// Copyright (c) 2012, SoundCloud Ltd.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-// Source code and contact info at http://github.com/soundcloud/visor
-
-package main
-
-import (
- "fmt"
- "github.com/soundcloud/visor"
- "os"
-)
-
-var cmdAppEnvGet = &Command{
- Name: "app-env-get",
- Short: "retrieve environment",
- UsageLine: "app-env-get <app> [key]",
- Long: `
-App-env-get returns the whole or filtered environment for an application.
- `,
-}
-
-func init() {
- cmdAppEnvGet.Run = runAppEnvGet
-}
-
-func runAppEnvGet(cmd *Command, args []string) {
- if len(args) < 1 {
- cmd.Flag.Usage()
- }
-
- s := cmdAppEnvGet.Snapshot
- name := args[0]
-
- app, err := visor.GetApp(s, name)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error fetching app %s\n", err.Error())
- os.Exit(1)
- }
-
- if len(args) == 2 {
- key := args[1]
- val, err := app.GetEnvironmentVar(key)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error fetching app env %s\n", err.Error())
- os.Exit(1)
- }
-
- fmt.Fprintf(os.Stdout, "%s=%s\n", key, val)
- } else {
- env, err := app.EnvironmentVars()
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error fetching app env %s\n", err.Error())
- os.Exit(1)
- }
-
- for key, val := range env {
- fmt.Fprintf(os.Stdout, "%s=%s\n", key, val)
- }
- }
-}
View
@@ -1,48 +0,0 @@
-// Copyright (c) 2012, SoundCloud Ltd.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-// Source code and contact info at http://github.com/soundcloud/visor
-
-package main
-
-import (
- "fmt"
- "github.com/soundcloud/visor"
- "os"
-)
-
-var cmdAppEnvSet = &Command{
- Name: "app-env-set",
- Short: "store environment variable",
- UsageLine: "app-env-set <app> <key> <value>",
- Long: `
-App-env-set stores a value for the given key in the application environment.
- `,
-}
-
-func init() {
- cmdAppEnvSet.Run = runAppEnvSet
-}
-
-func runAppEnvSet(cmd *Command, args []string) {
- if len(args) < 3 {
- cmd.Flag.Usage()
- }
-
- s := cmdAppEnvSet.Snapshot
- name := args[0]
- key := args[1]
- val := args[2]
-
- app, err := visor.GetApp(s, name)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error fetching app %s\n", err.Error())
- os.Exit(1)
- }
-
- _, err = app.SetEnvironmentVar(key, val)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error setting env var %s\n", err.Error())
- os.Exit(1)
- }
-}
View
@@ -1,47 +0,0 @@
-// Copyright (c) 2012, SoundCloud Ltd.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-// Source code and contact info at http://github.com/soundcloud/visor
-
-package main
-
-import (
- "fmt"
- "github.com/soundcloud/visor"
- "os"
-)
-
-var cmdAppHeadSet = &Command{
- Name: "app-head-set",
- Short: "set the app head",
- UsageLine: "app-head-set <app> <head>",
- Long: `
-App-head-set sets the latest revision of the app to <head>
- `,
-}
-
-func init() {
- cmdAppHeadSet.Run = runAppHeadSet
-}
-
-func runAppHeadSet(cmd *Command, args []string) {
- if len(args) < 2 {
- cmd.Flag.Usage()
- }
-
- s := cmdAppHeadSet.Snapshot
- name := args[0]
- head := args[1]
-
- app, err := visor.GetApp(s, name)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error fetching app %s\n", err.Error())
- os.Exit(1)
- }
-
- _, err = app.SetHead(head)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error setting app head %s\n", err.Error())
- os.Exit(1)
- }
-}
Oops, something went wrong.

0 comments on commit 4240463

Please sign in to comment.