dev 1.0.133 → 1.0.134
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dev.rb +1 -1
- data/lib/dev/Tasks.rb +3 -24
- metadata +1 -1
data/lib/dev.rb
CHANGED
@@ -42,7 +42,7 @@ puts_debug "read " + __FILE__.foreground(:green)
|
|
42
42
|
#require "#{File.dirname(__FILE__)}/dev/Environment.rb"
|
43
43
|
#require "#{File.dirname(__FILE__)}/dev/Hash.rb"
|
44
44
|
#require "#{File.dirname(__FILE__)}/dev/SystemCall.rb"
|
45
|
-
["Environment","Hash","SystemCall"].each{ |f| require "#{File.dirname(__FILE__)}/dev/#{f}.rb" }
|
45
|
+
["Tasks","Environment","Hash","SystemCall"].each{ |f| require "#{File.dirname(__FILE__)}/dev/#{f}.rb" }
|
46
46
|
Dir["#{File.dirname(__FILE__)}/dev/**/*.rb"].each{ |f| require f }
|
47
47
|
|
48
48
|
DEV_ROOT=Dev::Environment.dev_root
|
data/lib/dev/Tasks.rb
CHANGED
@@ -14,44 +14,23 @@ end
|
|
14
14
|
task :clean do; task_start "clean"; end
|
15
15
|
task :clobber do; task_start "clobber"; end
|
16
16
|
|
17
|
-
#desc "PROJECT information"
|
18
|
-
#task :info do
|
19
|
-
# task_start("info")
|
20
|
-
# PROJECT.info
|
21
|
-
#end
|
22
|
-
|
23
|
-
#desc "add files defined by src_glob to source code management"
|
24
|
-
#task :add do
|
25
|
-
# task_start("add")
|
26
|
-
# PROJECT.add
|
27
|
-
#end
|
28
|
-
|
29
|
-
#desc "commit changes to source code management"
|
30
|
-
#task :commit do
|
31
|
-
# task_start("commit")
|
32
|
-
# PROJECT.commit
|
33
|
-
#end
|
34
|
-
|
35
17
|
require 'rake/clean'
|
36
18
|
CLEAN.include('doc','*.gem','*.taskstamp*','**/*.{suo,sdf}')
|
37
19
|
CLOBBER.include('bin','obj')
|
38
20
|
|
39
21
|
def generate_task_hash(project)
|
40
22
|
task_hash = {
|
41
|
-
#:add=> { :desc=> 'add files defined by src_glob to source code management' },
|
42
23
|
:info=> { :desc=> 'display information about the rakefile' },
|
43
24
|
:compile=> { :desc=> 'compile' },
|
44
25
|
:test=> { :desc=> 'run unit tests' },
|
45
|
-
#:commit=> { :desc=> 'commit' },
|
46
26
|
:replace=> { :desc=> 'replace text' },
|
47
27
|
:loc=> { :desc=> 'count the lines of code' },
|
48
28
|
:setup=> { :desc=> 'setup the project environment' },
|
49
29
|
:pull=> { :desc=> 'rake working copies of dependencies' },
|
50
|
-
:check=> { :desc=> 'checks if the project default task may be skipped' }
|
51
|
-
#:update=> { :desc=> 'updates changes from source code management' }
|
30
|
+
:check=> { :desc=> 'checks if the project default task may be skipped' }
|
52
31
|
}
|
53
32
|
if(project[:scm_type]=="svn" || project[:scm_type]=="git")
|
54
|
-
task_hash[:add]={ :desc=> 'add files defined by src_glob to source code management' }
|
33
|
+
task_hash[:add] ={ :desc=> 'add files defined by src_glob to source code management' }
|
55
34
|
task_hash[:commit]={ :desc=> 'commit changes to source code management' }
|
56
35
|
task_hash[:update]={ :desc=> 'updates changes from source code management' }
|
57
36
|
end
|
@@ -62,6 +41,7 @@ def generate_task_hash(project)
|
|
62
41
|
end
|
63
42
|
|
64
43
|
def generate_tasks(project)
|
44
|
+
puts_debug "generate_tasks"
|
65
45
|
hash=generate_task_hash project
|
66
46
|
|
67
47
|
hash.each do |k,v|
|
@@ -70,7 +50,6 @@ def generate_tasks(project)
|
|
70
50
|
desc=v[:desc] if v.has_key?(:desc)
|
71
51
|
ruby="task :#{name} do; task_start '#{name}'; PROJECT.#{name}; end"
|
72
52
|
ruby="desc '#{desc}'; " + ruby unless desc.nil?
|
73
|
-
#unless Rake::Task.task_defined?(name)
|
74
53
|
if !task_exists?(name)
|
75
54
|
puts_debug "defining task " + name
|
76
55
|
eval(ruby)
|