diff --git a/.gitignore b/.gitignore index 1dff757..6780952 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Glide vendor/ +.glide/ # Compiled Object files, Static and Dynamic libs (Shared Objects) *.o diff --git a/CHANGELOG.md b/CHANGELOG.md index 60f2544..3aa88e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.1.0 +IMPROVEMENTS: +* Updated docker-machine deps +* Updated testImport deps +* Fixes #32 (Unable to complete build when .docker folder is on a symlink) + ## 1.0.10 IMPROVEMENTS: * Mount on both /c/Users and /Users for compatibility diff --git a/Makefile b/Makefile index 8e33942..906d8a8 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ default: deps test build -deps: clean +deps: go get github.com/Masterminds/glide glide install diff --git a/appveyor.yml b/appveyor.yml index b8da714..07cf53a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ # appveyor.yml reference : http://www.appveyor.com/docs/appveyor-yml -version: "1.0.10.{build}" +version: "1.1.0.{build}" # Source Config pull_requests: @@ -12,30 +12,25 @@ clone_folder: c:\gopath\src\github.com\pecigonzalo\docker-machine-vmwareworkstat clone_depth: 5 # Build host - os: Windows Server 2012 R2 environment: MSYSTEM: MINGW64 Msys: winsymlink:nativestrict GOPATH: c:\gopath - Path: c:\go\bin;c:\gopath\bin;C:\msys64\usr\local\bin;C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH% - matrix: - - GOARCH: 386 - GOVERSION: 1.6 - - GOARCH: amd64 - GOVERSION: 1.6 + Path: c:\go\bin;%GOPATH%\bin;C:\msys64\usr\local\bin;C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH% init: - ps: git config --global core.autocrlf input - pacman -Sy - - pacman -S --noconfirm make wget curl bzr git mercurial subversion + - pacman -S --noconfirm --needed make wget curl # Build install: - - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-%GOARCH%.msi - - msiexec /i go%GOVERSION%.windows-%GOARCH%.msi /q + - go version + - go env - ps: echo $env:Path + - make clean - make deps cache: @@ -50,7 +45,7 @@ test: off # Deploy artifacts: - - path: //bin/docker-machine-driver-vmwareworkstation.exe + - path: /bin/docker-machine-driver-vmwareworkstation.exe deploy: provider: GitHub diff --git a/glide.lock b/glide.lock index 26f3645..b8e1276 100644 --- a/glide.lock +++ b/glide.lock @@ -1,30 +1,30 @@ -hash: 75294a28793879eedd26ccceee2979bef691bf02eb7c99c4ab34d214db8cfe96 -updated: 2016-07-06T13:07:31.3243298+02:00 +hash: 24b9a0ba6a3c6b5fa751185871ccafa8f25a2bfd4b8b1d056a2a5b6f9eb69325 +updated: 2017-01-23T19:17:35.8738671+01:00 imports: - name: github.com/docker/docker version: a8a31eff10544860d2188dddabdee4d727545796 subpackages: - pkg/term - name: github.com/docker/machine - version: a650a404fc3e006fea17b12615266168db79c776 + version: 15fd4c70403bab784d91031af02d9e169ce66412 subpackages: - libmachine/drivers - libmachine/drivers/plugin + - libmachine/drivers/plugin/localbinary + - libmachine/drivers/rpc - libmachine/log - libmachine/mcnflag - libmachine/mcnutils - libmachine/ssh - libmachine/state - - version - - libmachine/drivers/plugin/localbinary - - libmachine/drivers/rpc - libmachine/version + - version - name: golang.org/x/crypto version: beef0f4390813b96e8e68fd78570396d0f4751fc subpackages: + - curve25519 - ssh - ssh/terminal - - curve25519 testImports: - name: github.com/davecgh/go-spew version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d @@ -35,6 +35,6 @@ testImports: subpackages: - difflib - name: github.com/stretchr/testify - version: f390dcf405f7b83c997eac1b06768bb9f44dec18 + version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 subpackages: - assert diff --git a/glide.yaml b/glide.yaml index 5b082a9..f32e694 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,7 +1,7 @@ package: github.com/pecigonzalo/docker-machine-vmwareworkstation import: - package: github.com/docker/machine - version: v0.7.0 + version: v0.9.0 subpackages: - libmachine/drivers - libmachine/drivers/plugin @@ -15,6 +15,6 @@ import: - ssh testImport: - package: github.com/stretchr/testify - version: v1.1.3 + version: v1.1.4 subpackages: - assert diff --git a/workstation.go b/workstation.go index 81fb582..3cb040f 100644 --- a/workstation.go +++ b/workstation.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "net" "os" - "path/filepath" "regexp" "runtime" "strings" @@ -193,13 +192,13 @@ func (d *Driver) GetIP() (string, error) { return ip, nil } +// GetState returns the current state of the machine. func (d *Driver) GetState() (state.State, error) { // VMRUN only tells use if the vm is running or not - vmxp, err := filepath.EvalSymlinks(d.vmxPath()) - if err != nil { + if _, err := os.Stat(d.vmxPath()); os.IsNotExist(err) { return state.Error, err } - if stdout, _, _ := vmrun("list"); strings.Contains(stdout, vmxp) { + if stdout, _, _ := vmrun("list"); strings.Contains(stdout, d.vmxPath()) { return state.Running, nil } return state.Stopped, nil @@ -451,7 +450,7 @@ func (d *Driver) Remove() error { func (d *Driver) Restart() error { _, _, err := vmrun("reset", d.vmxPath(), "nogui") - + log.Debugf("Mounting Shared Folders...") var shareName, shareDir, guestFolder, guestCompatLink string // TODO configurable at some point switch runtime.GOOS { @@ -484,7 +483,7 @@ func (d *Driver) Restart() error { vmrun("-gu", B2DUser, "-gp", B2DPass, "runScriptInGuest", d.vmxPath(), "/bin/sh", command) } } - + return err }