Skip to content
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

Using 'RELEASE' if no version is given #8

Merged
merged 1 commit into from Jul 29, 2013
Merged

Using 'RELEASE' if no version is given #8

merged 1 commit into from Jul 29, 2013

Conversation

xsc
Copy link
Collaborator

@xsc xsc commented Jul 29, 2013

As discussed in #7, this pull request should enable lein-try to handle calls without explicit version numbers, e.g.:

lein try panoptic

The mechanism relies on the new function version-string? which determines if a given String represents a version number by checking against "RELEASE", "LATEST" and whether it starts with a number or not. Since artifact IDs may not start with a number (Clojure symbols mustn't, at least), I think this will suffice. (Maybe the lowercase Strings "release" and "latest" should be included?)

Example:

$ lein try panoptic
Retrieving panoptic/panoptic/0.2.1/panoptic-0.2.1.pom from clojars
Retrieving panoptic/panoptic/0.2.1/panoptic-0.2.1.jar from clojars
nREPL server started on port 34336
REPL-y 0.2.0
Clojure 1.5.1
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)

user=>

@avescodes
Copy link
Owner

Awesome! I'm going to bump the minor version and do a release of this today. (Docs will also need an update, I think this is a huge improvement!)

avescodes pushed a commit that referenced this pull request Jul 29, 2013
Using 'RELEASE' if no version is given
@avescodes avescodes merged commit 8c1cedb into avescodes:master Jul 29, 2013
@xsc xsc deleted the lein-try-default-to-release branch July 29, 2013 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants