tsantos-rakejava 1.0.5 → 1.1.0
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.
- data/lib/rakejava.rb +14 -1
- metadata +1 -1
data/lib/rakejava.rb
CHANGED
@@ -198,7 +198,7 @@ module RakeJava
|
|
198
198
|
class JarTask < Rake::Task
|
199
199
|
include RakeJavaUtil
|
200
200
|
|
201
|
-
attr_accessor :files, :main_class, :manifest
|
201
|
+
attr_accessor :files, :main_class, :manifest, :sign_info
|
202
202
|
|
203
203
|
def initialize name, app
|
204
204
|
super
|
@@ -241,6 +241,19 @@ module RakeJava
|
|
241
241
|
puts cmd[0..max_cmd_len] + "..."
|
242
242
|
end
|
243
243
|
puts `#{cmd}`
|
244
|
+
|
245
|
+
# Now, sign the jar if we're asked to. This only supports the
|
246
|
+
# arguments that I need for my project at the moment.
|
247
|
+
if @sign_info
|
248
|
+
cmd = "jarsigner"
|
249
|
+
cmd << " -storetype #{@sign_info[:store_type]}"
|
250
|
+
cmd << " -keystore #{@sign_info[:key_store]}"
|
251
|
+
cmd << " -storepass #{@sign_info[:store_pass]}"
|
252
|
+
cmd << " #{@name}"
|
253
|
+
cmd << " #{@sign_info[:alias]}"
|
254
|
+
puts cmd
|
255
|
+
puts `#{cmd}`
|
256
|
+
end
|
244
257
|
end
|
245
258
|
|
246
259
|
protected
|