rejeep/carton — pull request #17 by lunaryorn (2013-02-14 16:27:39+00:00)
Title: Add command to print package version

Add a `version` command to print the version of the package:

```
$ cat Carton ◼
(source "melpa" "http://melpa.milkbox.net/packages/")

(package "flycheck" "0.6.1" "Flymake done right

Flycheck provides on-the-fly syntax checker with

- major-mode based checkers,
- simple declarative checker definitions,
- built-in checkers for many languages,
- standard error navigation,
- easy customization,
- and a clean, concise and understandable implementation.")

(depends-on "s" "1.3.1")
(depends-on "dash" "1.0.3")

;; Various modes for use in the unit tests
(development
(depends-on "coffee-mode")
(depends-on "haml-mode")
(depends-on "js2-mode")
(depends-on "js3-mode")
(depends-on "lua-mode")
(depends-on "cperl-mode")
(depends-on "php-mode")
(depends-on "php+-mode")
(depends-on "sass-mode"))
$ carton version
0.6.1
```

This command is intended to easy the writing of Makefiles or other build scripts that may need the package version.

See the [Flycheck `Makefile`](https://github.com/lunaryorn/flycheck/blob/info-manual/Makefile) for an example for this command.