pjam 0.0.4.pre → 0.0.5.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/bin/pjam +62 -4
  2. metadata +1 -1
data/bin/pjam CHANGED
@@ -19,6 +19,8 @@ EOS
19
19
 
20
20
  opt :p, "path to project", :type => :string
21
21
  opt :skip_pinto, "skipp adding distos to pinto", :default => false
22
+ opt :no_color, "work in colorless mode", :default => false
23
+ opt :no_misc, "do not install msic modules", :default => false
22
24
  opt :only, "only build this projects", :type => :string, :default => nil
23
25
  end
24
26
 
@@ -55,6 +57,7 @@ sources_list.each do |src|
55
57
 
56
58
  distro_name = `cd #{project_id}/#{src} && ls *.gz`.chomp!
57
59
 
60
+
58
61
  if opts[:skip_pinto] == true
59
62
 
60
63
  compile_list << distro_name
@@ -62,12 +65,16 @@ sources_list.each do |src|
62
65
 
63
66
  else
64
67
 
65
- puts dark { magenta { bold { "add #{src} [#{distro_name}] to pinto" } } }
68
+ if opts[:no_color] == true
69
+ puts "add #{src} [#{distro_name}] to pinto"
70
+ else
71
+ puts dark { magenta { bold { "add #{src} [#{distro_name}] to pinto" } } }
72
+ end
66
73
 
67
74
  cmd ="cd #{project_id}/#{src} && pinto delete -v PINTO/#{distro_name}"
68
75
  system(cmd) == true
69
76
 
70
- cmd ="cd #{project_id}/#{src} && pinto add -s #{config['stack']} -v #{distro_name}"
77
+ cmd ="cd #{project_id}/#{src} && pinto add -x AdriverCore::AdRiverCookie -s #{config['stack']} -v #{distro_name}"
71
78
  system(cmd) == true or raise "failed do cmd: #{cmd}"
72
79
 
73
80
  compile_list << distro_name
@@ -79,14 +86,65 @@ end
79
86
 
80
87
 
81
88
  compile_list.each do |d|
82
- puts green { bold { "compile #{compile_list_pp[d]} [#{d}]" } }
89
+
90
+ if opts[:no_color] == true
91
+ puts "compile #{compile_list_pp[d]} [#{d}]"
92
+ else
93
+ puts green { bold { "compile #{compile_list_pp[d]} [#{d}]" } }
94
+ end
95
+
83
96
  cmd = "pinto install -s #{config['stack']} -l #{local_lib} -o 'q' PINTO/#{d}"
84
97
  system(cmd) == true or raise "failed do cmd: #{cmd}"
85
98
  end
86
99
 
87
100
 
88
- puts yellow { bold { "make distributive from #{config['application']}" } }
101
+ if config.has_key? 'modules' && opts[:no_misc] == false
102
+
103
+ if opts[:no_color] == true
104
+ puts "pulling / compiling misc modules"
105
+ else
106
+ puts dark { blue { bold { "pulling / compiling misc modules" } } }
107
+ end
108
+
109
+ config['modules'].each do |m|
110
+
111
+ if opts[:no_color] == true
112
+ puts "pull #{m}"
113
+ else
114
+ puts dark { magenta { bold { "pull #{m}" } } }
115
+ end
116
+ cmd ="pinto pull -s #{config['stack']} -v #{m}"
117
+ system(cmd) == true or raise "failed do cmd: #{cmd}"
118
+
119
+ if opts[:no_color] == true
120
+ puts "compile #{m}"
121
+ else
122
+ puts dark { green { bold { "compile #{m}" } } }
123
+ end
124
+
125
+ cmd = "pinto install -s #{config['stack']} -l #{local_lib} -o 'q' #{m}"
126
+ system(cmd) == true or raise "failed do cmd: #{cmd}"
127
+
128
+ end
129
+ end
130
+
131
+
132
+ if opts[:no_color] == true
133
+ puts "make distributive from #{config['application']}"
134
+ else
135
+ puts yellow { bold { "make distributive from #{config['application']}" } }
136
+ end
137
+
89
138
  cmd = "cd #{project_id}/#{config['application']} && rm -rf cpanlib && mkdir cpanlib/ && cp -r #{local_lib}/* cpanlib/ && rm -rf *.gz && ./Build realclean --quiet 1>/dev/null && perl Build.PL --quiet 1>/dev/null 2>module_build.err.log && ./Build manifest --quiet 2>/dev/null 1>/dev/null && ./Build dist --quiet 1>/dev/null && ln -fs `ls #{project_id}/#{config['application']}/*.gz` #{project_id}/current.tar.gz && echo -n `ls *.gz` > #{project_id}/current.txt"
90
139
  system(cmd) == true or raise "failed do cmd: #{cmd}"
91
140
 
92
141
 
142
+ if opts[:no_color] == true
143
+ puts "testing #{config['application']}"
144
+ else
145
+ puts cyan { bold { "testing #{config['application']}" } }
146
+ end
147
+
148
+ cmd = "cd #{project_id} && pinto install -s #{config['stack']} -l #{local_lib} -o 'test-only' PINTO/`cat current.txt`"
149
+ system(cmd) == true or raise "failed do cmd: #{cmd}"
150
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pjam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.pre
4
+ version: 0.0.5.pre
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: