Skip to content

Commit

Permalink
Changed 'auto' to 'range.' Updated README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridha Hassoun committed Mar 13, 2017
1 parent d0d1e51 commit e707e42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ npm install --global @captainsafia/legit
-h, --help output usage information
-f --file <file> The file to add a header to
-u --user [user] The user/organization who holds the license
-y --year [year] The year the license is in effect
-y --year [year] The year the license is in effect.
If 'range' is used in place of a year, a date range from the first commit year to the current year will be used.
```

![Legit Demo](https://cloud.githubusercontent.com/assets/1857993/23821404/bea5dfc2-05f6-11e7-8525-7f5bd88a7829.gif)
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ program
var yearArg;
const userArg = this.user || username.sync();

if (this.year === "auto") {
if (this.year === "range") {
var firstCommitYear = firstCommitDate.sync(cwd + '/.git').getFullYear();
var currentYear = new Date().getFullYear();
if (currentYear === firstCommitYear) {
Expand Down

0 comments on commit e707e42

Please sign in to comment.