Skip to content

Commit

Permalink
Fix copyright update in prepare lane (#191)
Browse files Browse the repository at this point in the history
* Add dedicated copyright lane

* Add dedicated copyright lane

* Use ../ instead of ruby's chdir
  • Loading branch information
Daniel authored Nov 20, 2019
1 parent d65db2f commit e709a9b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,8 @@ lane :prepare do |options|
sh("git diff-index --quiet HEAD || git commit -am 'Automatically format code'")
ensure_git_status_clean

# Update license header year
sh "scripts/update-license-year.sh"
sh("git diff-index --quiet HEAD || git commit -am 'Update license header year - happy new year'")
ensure_git_status_clean
# Update copyright year if needed
copyright

# Run tests
test
Expand Down Expand Up @@ -145,3 +143,13 @@ lane :sonarqube do |options|
sonar_runner_args: runner_args
)
end

desc "Updates the copyright year of license headers in source files if needed"
lane :copyright do |options|
ensure_git_status_clean

sh("../scripts/update-license-year.sh")
sh("git diff-index --quiet HEAD || git commit -am 'Update license header year - happy new year'")

ensure_git_status_clean
end

0 comments on commit e709a9b

Please sign in to comment.