Skip to content

Commit

Permalink
fix-license
Browse files Browse the repository at this point in the history
Signed-off-by: thalles <lopthalles@gmail.com>
  • Loading branch information
thalleslmF committed Jul 30, 2021
1 parent 310557d commit e8e70f9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions licence.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ const util = require("util");
const chalk = require("chalk");
function hasCorrectCopyrightDate(copyrightFile, file, startDateLicense) {
let requiredDate = ''
console.log(file.year < new Date().getFullYear())
console.log(startDateLicense)
console.log(new Date().getFullYear())
if (file.status === 'modified'){
if(file.year < new Date().getFullYear()) {
requiredDate = `Copyright ${startDateLicense, new Date().getFullYear()}`
}else{
requiredDate = `Copyright ${new Date().getFullYear()}`
}
requiredDate = `Copyright ${new Date().getFullYear()}`
}
if (file.status === 'created'){
requiredDate = `Copyright ${new Date().getFullYear()}`
}
console.log(requiredDate)
return copyrightFile.includes(requiredDate)
}

Expand Down

0 comments on commit e8e70f9

Please sign in to comment.