azukiapp / azk

azk is a lightweight open source development environment orchestration tool. Instantly & safely run any environment on your local machine.
http://azk.io
Apache License 2.0
898 stars 63 forks source link

[Package] Updating how `azk version` is extracted from CLI #645

Closed fearenales closed 8 years ago

fearenales commented 8 years ago

This PR intends to update azk scripts and tests for the changes from #614

The command used to extract azk version from command line is:

$ azk version | sed -e 's/^azk //; s/^version //; s/,.*//'

This works for both old and new azk version output:

# New version output format
$ echo "azk version 0.17.0, build 2f55d48, date 2016-04-01" | \
  sed -e 's/^azk //; s/^version //; s/,.*//'
#=> 0.17.0

# Old version output format
$ echo "azk 0.17.0" | \
  sed -e 's/^azk //; s/^version //; s/,.*//'
#=> 0.17.0