Merge pull request #4414 from nogoegst/go-get-cmd

Move cmd files under cmd/docker-machine to make it go-install-able
This commit is contained in:
David Gageot
2018-03-14 21:06:30 +01:00
committed by GitHub
5 changed files with 3 additions and 4 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,3 @@
docker-machine*
*.log
*.iml
.idea/

View File

@@ -10,7 +10,7 @@ environment:
clone_folder: c:\gopath\src\github.com\docker\machine
build_script:
- go build -i -o ./bin/docker-machine.exe ./cmd/machine.go
- go build -i -o ./bin/docker-machine.exe ./cmd/docker-machine
test_script:
- powershell -Command go test -v ./libmachine/shell

View File

@@ -18,7 +18,7 @@ define gocross
$(GO) build \
-o $(PREFIX)/bin/$(PKG_NAME)-${os.$(1)}-${arch.$(2)}$(call extension,$(GOOS)) \
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;)
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/docker-machine;)
endef
build-clean:
@@ -31,6 +31,6 @@ $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS)): $(shell find . -type f -name
$(GO) build \
-o $@ \
$(VERBOSE_GO) -tags "$(BUILDTAGS)" \
-ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) ./cmd/machine.go
-ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) ./cmd/docker-machine
build: $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS))