pjam 0.0.5.pre → 0.0.6.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/pjam +14 -8
  2. metadata +17 -1
data/bin/pjam CHANGED
@@ -33,6 +33,12 @@ if (opts[:p].nil? || opts[:p].empty?)
33
33
  end
34
34
 
35
35
 
36
+ if opts[:no_color] == true
37
+ color_flag = '--no-color'
38
+ else
39
+ color_flag = ''
40
+ end
41
+
36
42
  config = JSON.parse(File.read("#{project_id}/pjam.json"))
37
43
 
38
44
 
@@ -49,7 +55,7 @@ compile_list_pp = {}
49
55
 
50
56
  sources_list.each do |src|
51
57
 
52
- cmd = "cd #{project_id}/#{src} && rm -rf cpanlib && svn up -q"
58
+ cmd = "cd #{project_id}/#{src} && rm -rf cpanlib && svn up "
53
59
  st = system(cmd) == true or raise "failed do cmd: #{cmd}"
54
60
 
55
61
  cmd = "cd #{project_id}/#{src} && rm -rf *.gz && rm -rf MANIFEST && perl Build.PL --quiet 1>/dev/null 2>module_build.err.log && ./Build realclean && 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"
@@ -71,10 +77,10 @@ sources_list.each do |src|
71
77
  puts dark { magenta { bold { "add #{src} [#{distro_name}] to pinto" } } }
72
78
  end
73
79
 
74
- cmd ="cd #{project_id}/#{src} && pinto delete -v PINTO/#{distro_name}"
80
+ cmd ="cd #{project_id}/#{src} && pinto delete -v PINTO/#{distro_name} #{color_flag}"
75
81
  system(cmd) == true
76
82
 
77
- cmd ="cd #{project_id}/#{src} && pinto add -x AdriverCore::AdRiverCookie -s #{config['stack']} -v #{distro_name}"
83
+ cmd ="cd #{project_id}/#{src} && pinto add -x AdriverCore::AdRiverCookie -s #{config['stack']} -v #{distro_name} #{color_flag}"
78
84
  system(cmd) == true or raise "failed do cmd: #{cmd}"
79
85
 
80
86
  compile_list << distro_name
@@ -93,7 +99,7 @@ compile_list.each do |d|
93
99
  puts green { bold { "compile #{compile_list_pp[d]} [#{d}]" } }
94
100
  end
95
101
 
96
- cmd = "pinto install -s #{config['stack']} -l #{local_lib} -o 'q' PINTO/#{d}"
102
+ cmd = "pinto install -s #{config['stack']} -l #{local_lib} -o 'q' PINTO/#{d} #{color_flag}"
97
103
  system(cmd) == true or raise "failed do cmd: #{cmd}"
98
104
  end
99
105
 
@@ -113,7 +119,7 @@ if config.has_key? 'modules' && opts[:no_misc] == false
113
119
  else
114
120
  puts dark { magenta { bold { "pull #{m}" } } }
115
121
  end
116
- cmd ="pinto pull -s #{config['stack']} -v #{m}"
122
+ cmd ="pinto pull -s #{config['stack']} -v #{m} #{color_flag}"
117
123
  system(cmd) == true or raise "failed do cmd: #{cmd}"
118
124
 
119
125
  if opts[:no_color] == true
@@ -122,7 +128,7 @@ if config.has_key? 'modules' && opts[:no_misc] == false
122
128
  puts dark { green { bold { "compile #{m}" } } }
123
129
  end
124
130
 
125
- cmd = "pinto install -s #{config['stack']} -l #{local_lib} -o 'q' #{m}"
131
+ cmd = "pinto install -s #{config['stack']} -l #{local_lib} -o 'q' #{m} #{color_flag}"
126
132
  system(cmd) == true or raise "failed do cmd: #{cmd}"
127
133
 
128
134
  end
@@ -132,7 +138,7 @@ end
132
138
  if opts[:no_color] == true
133
139
  puts "make distributive from #{config['application']}"
134
140
  else
135
- puts yellow { bold { "make distributive from #{config['application']}" } }
141
+ puts yellow { bold { "make distributive from #{config['application']}" } }
136
142
  end
137
143
 
138
144
  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"
@@ -145,6 +151,6 @@ else
145
151
  puts cyan { bold { "testing #{config['application']}" } }
146
152
  end
147
153
 
148
- cmd = "cd #{project_id} && pinto install -s #{config['stack']} -l #{local_lib} -o 'test-only' PINTO/`cat current.txt`"
154
+ cmd = "cd #{project_id} && pinto install -s #{config['stack']} -l #{local_lib} -o 'test-only' PINTO/`cat current.txt` #{color_flag}"
149
155
  system(cmd) == true or raise "failed do cmd: #{cmd}"
150
156
 
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.5.pre
4
+ version: 0.0.6.pre
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -59,6 +59,22 @@ dependencies:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: sinatra
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
62
78
  description: Smart pinto glue - jam between source code and pinto
63
79
  email: melezhik@gmail.com
64
80
  executables: