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

Larg PR - Adds support for features #3 , #19 , and #20 #27

Closed
wants to merge 5 commits into from

Conversation

kbknapp
Copy link
Member

@kbknapp kbknapp commented Apr 24, 2015

This PR adds the features of #3 and #19

Same as before, I'll wait until at least one other person takes a look at this before merging. The testing I did looked good, but it's always possible to miss something :)

@kbknapp kbknapp mentioned this pull request Apr 24, 2015
This is a decent change. Now the CommitType enum is auto-generated via a
macro. This macro also implements two helper methods, and one Trait. The
helper methods return a Vec<'static str> of all "aliases" for specified
variant if called like CommitType::Variant.aliases(). Or if called on
the enum itself there the method returns ALL aliases such as
CommitType::all_aliases(). The macro also implments the
std::str::FromStr trait so you can parse from a string to a known enum
type automatically. Say we defined a "feat" or "ft" alias of variant
"Feature", if we had a string of "ft" or "feature" we could call
some_str.parse::<CommitType>().unwrap() to get a CommitType::Feature, or if it
failed to parse we get a CommitType::Unknown

Closes #3
@kbknapp
Copy link
Member Author

kbknapp commented Apr 25, 2015

This PR also add minimal support for #20

The way it works is it looks for a .clog.toml file inside the repo you run clog from (your current working directory). The file is structured like this:

[clog]
repository = "https://github.com/thoughtram/clog"
subtitle = "my super cool subtitle"
from-latest-tag = true

Those are the only three options supported so far. All are optional, you can specify them all, or none of them. And anything you pass via the command line flags (such as --repository) overrides the .clog.toml

It's pretty awesome now when I update my clap changelog I simply run clog --patch and the rest is taken care of for me :D

@kbknapp kbknapp changed the title Larger PR for #3 and #19 combined Larg PR - Adds support for features #3 , #19 , and #20 Apr 25, 2015
@cburgdorf
Copy link
Contributor

That's super cool work! I just tried it out and it's awesome. 👍

I also cutted a new release 0.4.0 and published it on crates.io.

@cburgdorf cburgdorf closed this Apr 26, 2015
@vyp
Copy link

vyp commented Apr 26, 2015

Btw, the "temporary files" thing is for vim I believe, if you're wondering.

@cburgdorf
Copy link
Contributor

Btw, the "temporary files" thing is for vim I believe, if you're wondering.

I'm quite liberal with putting things on the .gitignore. Whatever get's in the way, just put it there ;)

@kbknapp kbknapp deleted the patch-3 branch May 4, 2015 00:40
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.

3 participants