You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2014/05/29 02:00:40 UTC
[2/2] git commit: Add automated check that addons named correctly
Add automated check that addons named correctly
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/fb49ee84
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/fb49ee84
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/fb49ee84
Branch: refs/heads/master
Commit: fb49ee8462344d322d2a5765b235438847ad5910
Parents: cbc9bb7
Author: Peter Donald <pe...@realityforge.org>
Authored: Thu May 29 09:59:28 2014 +1000
Committer: Peter Donald <pe...@realityforge.org>
Committed: Thu May 29 09:59:28 2014 +1000
----------------------------------------------------------------------
rakelib/checks.rake | 9 +++++++--
rakelib/stage.rake | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/buildr/blob/fb49ee84/rakelib/checks.rake
----------------------------------------------------------------------
diff --git a/rakelib/checks.rake b/rakelib/checks.rake
index e567b60..6b02665 100644
--- a/rakelib/checks.rake
+++ b/rakelib/checks.rake
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations under
# the License.
-
desc 'Check that source files contain the Apache license'
-task 'license' => FileList['{addond,lib,doc,rakelib}/**/*.{rb,rake,java}', 'buildr.gemspec', 'Rakefile'] do |task|
+task 'license' => FileList['{addon,lib,doc,rakelib}/**/*.{rb,rake,java}', 'buildr.gemspec', 'Rakefile'] do |task|
puts 'Checking that files contain the Apache license ... '
required = task.prerequisites.select { |fn| File.file?(fn) }
missing = required.reject { |fn|
@@ -26,3 +25,9 @@ task 'license' => FileList['{addond,lib,doc,rakelib}/**/*.{rb,rake,java}', 'buil
fail "#{missing.join(', ')} missing Apache License, please add it before making a release!" unless missing.empty?
puts '[x] Source files contain the Apache license'
end
+
+desc 'Check that files in addon directory do not have the .rake suffix.'
+task 'addon_extensions:check' do
+ bad_files = FileList['addon/**/*.rake']
+ fail "#{bad_files.join(', ')} named with .rake extension but should be .rb, fix them before making a release!" unless bad_files.empty?
+end
http://git-wip-us.apache.org/repos/asf/buildr/blob/fb49ee84/rakelib/stage.rake
----------------------------------------------------------------------
diff --git a/rakelib/stage.rake b/rakelib/stage.rake
index e4ef63a..80f6719 100644
--- a/rakelib/stage.rake
+++ b/rakelib/stage.rake
@@ -77,6 +77,7 @@ task 'prepare' do |task, args|
end.call
task('license').invoke
+ task('addon_extensions:check').invoke
# Need Prince to generate PDF
lambda do