dev 2.0.228 → 2.0.229
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/base/project.rb +10 -0
- data/lib/base/projects.rb +12 -1
- data/lib/dev.rb +1 -0
- data/lib/tasks/publish.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34215bffbb4c1d6fcf463deac226f0082f663a73
|
4
|
+
data.tar.gz: 7344d81170b773d1baf328988a4e738cc90dce7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5be1a82fbe5e1431516d23f9f67e7b29ac3a18e95874adbdea093bbb87a5213f929789bcce1d2ab958e151769a53736d06be6e33bf6f70705f28a99cb3cacf08
|
7
|
+
data.tar.gz: bd682e97ddbb2e116774007dd7adaf548c1b74fb2fe8a21c917c7a86cdcf34903c7242fcda5d74174fd89876ea15a70f06753bbb35a2dd8231c34cf9e262c87b
|
data/lib/base/project.rb
CHANGED
@@ -167,6 +167,16 @@ class Project < Hash
|
|
167
167
|
end
|
168
168
|
end
|
169
169
|
|
170
|
+
def work
|
171
|
+
clone
|
172
|
+
checkout
|
173
|
+
if(File.exists?(wrk_dir))
|
174
|
+
Dir.chdir(wrk_dir) do
|
175
|
+
Command.exit_code('rake default')
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
170
180
|
def tags
|
171
181
|
tags=Array.new
|
172
182
|
if !File.exists? wrk_dir
|
data/lib/base/projects.rb
CHANGED
@@ -33,7 +33,7 @@ class Projects < Hash
|
|
33
33
|
update
|
34
34
|
end
|
35
35
|
|
36
|
-
def
|
36
|
+
def list filter=''
|
37
37
|
self.each{|k,v|
|
38
38
|
puts k if(filter.length == 0 || k.include?(filter))
|
39
39
|
}
|
@@ -53,6 +53,17 @@ class Projects < Hash
|
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
56
|
+
def work args
|
57
|
+
filter=''
|
58
|
+
filter=args[1] if !args.nil? && args.length > 0
|
59
|
+
self.each{|k,v|
|
60
|
+
if filter.nil? || filter.length==0 || k.include?(filter)
|
61
|
+
puts "working #{k} #{tag}"
|
62
|
+
v.work
|
63
|
+
end
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
56
67
|
def self.user_projects_filename
|
57
68
|
FileUtils.mkdir("#{Environment.dev_root}/data") if(!File.exists?("#{Environment.dev_root}/data"))
|
58
69
|
"#{Environment.dev_root}/data/PROJECTS.json"
|
data/lib/dev.rb
CHANGED
@@ -16,6 +16,7 @@ class Dev
|
|
16
16
|
PROJECTS.import(args.length>1 ? args[1]:'') if args.length > 0 && args[0] == 'import'
|
17
17
|
PROJECTS.show(args.length>1 ? args[1]:'') if args.length > 0 && args[0] == 'list'
|
18
18
|
PROJECTS.make(args) if args.length > 0 && args[0] == 'make'
|
19
|
+
PROJECTS.work(args) if args.length > 0 && args[0] == 'work'
|
19
20
|
usage if args.length == 0
|
20
21
|
end
|
21
22
|
|
data/lib/tasks/publish.rb
CHANGED
@@ -6,6 +6,7 @@ task :publish do Tasks.execute_task :publish; end
|
|
6
6
|
class Publish < Array
|
7
7
|
def update
|
8
8
|
|
9
|
+
FileUtils.mkdir_p("#{Environment.dev_root}/publish") if !File.exists?("#{Environment.dev_root}/publish")
|
9
10
|
if(File.exists?('.git') && defined?(VERSION))
|
10
11
|
add "<%Git.tag('#{Rake.application.original_dir}','#{VERSION}')%>"
|
11
12
|
end
|