Skip to content

1.2.1 release #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 8, 2017
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.2.1

- Support the Docker version numbering change

## 1.2.0

- Added Docker-based development support
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Machine struct {
func (m *Machine) Create(driver string, cpuCount string, memSize string, diskSize string) {
m.out.Info.Printf("Creating a %s machine named '%s' with CPU(%s) MEM(%s) DISK(%s)...", driver, m.Name, cpuCount, memSize, diskSize)

boot2dockerUrl := "https://github.com/boot2docker/boot2docker/releases/download/v" + util.GetCurrentDockerVersion().String() + "/boot2docker.iso"
boot2dockerUrl := "https://github.com/boot2docker/boot2docker/releases/download/v" + util.GetRawCurrentDockerVersion() + "/boot2docker.iso"

var create *exec.Cmd

Expand Down
2 changes: 1 addition & 1 deletion cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/urfave/cli"
)

const VERSION = "1.2.0"
const VERSION = "1.2.1"

// It all starts here
func main() {
Expand Down
10 changes: 7 additions & 3 deletions cli/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ func AskYesNo(question string) bool {

}

func GetCurrentDockerVersion() *version.Version {
func GetRawCurrentDockerVersion() string {
output, _ := exec.Command("docker", "--version").Output()
re := regexp.MustCompile("Docker version ([\\d|\\.]+)")
versionNumber := re.FindAllStringSubmatch(string(output), -1)[0][1]
re := regexp.MustCompile("Docker version (.*),")
return re.FindAllStringSubmatch(string(output), -1)[0][1]
}

func GetCurrentDockerVersion() *version.Version {
versionNumber := GetRawCurrentDockerVersion()
return version.Must(version.NewVersion(versionNumber))
}

Expand Down