roger_themes 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roger_themes/version.rb +1 -1
- data/lib/roger_themes/xc_finalizer.rb +7 -9
- 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: 4d54eb2f4c59f60e0b7fc3e773b34f556b7b7316
|
4
|
+
data.tar.gz: a753831fc33622b5b94f6ce05de780adc9039555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21c8f1b1516399afa85b98c939202ae07e03c196a2deb27b66ab1a9d4c4bb51b5625f91b3ca70deb5b8ba7abe213ac6a41877ffc2e80cae3a3fb92ee2e1dc948
|
7
|
+
data.tar.gz: b300d3edde063b45e551c358740ae29260a2b26fb60eb7cbfdb1b3d6bd83c56c184726da5a3e7be42429fb6cc7c3c10f5f1189146698f791502b9e9ee9bbd2da
|
data/lib/roger_themes/version.rb
CHANGED
@@ -8,13 +8,13 @@ module RogerThemes
|
|
8
8
|
#
|
9
9
|
# @param [Release] release
|
10
10
|
# @param [Hash] options Options hash
|
11
|
-
# @option options [String] :prefix (
|
11
|
+
# @option options [String, nil] :prefix (nil) The name to prefix the zipfile with (before version)
|
12
12
|
# @option options [String] :zip ("zip") The ZIP command to use
|
13
|
-
# @option options [String] :source_path (release.build_path + "themes/*") The paths to zip
|
14
|
-
# @option options [String] :target_path (release.build_path + "themes/zips") The path to the zips
|
13
|
+
# @option options [String, Pathname] :source_path (release.build_path + "themes/*") The paths to zip
|
14
|
+
# @option options [String, Pathname] :target_path (release.build_path + "themes/zips") The path to the zips
|
15
15
|
def call(release, options = {})
|
16
16
|
options = {
|
17
|
-
:prefix =>
|
17
|
+
:prefix => nil,
|
18
18
|
:zip => "zip",
|
19
19
|
:source_path => release.build_path + "themes/*",
|
20
20
|
:target_path => release.build_path + "themes/zips"
|
@@ -22,13 +22,11 @@ module RogerThemes
|
|
22
22
|
|
23
23
|
dirs = Dir.glob(options[:source_path].to_s)
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
zipdir = options[:target_path]
|
25
|
+
zipdir = Pathname.new(options[:target_path])
|
28
26
|
FileUtils.mkdir_p(zipdir) unless zipdir.exist?
|
29
27
|
|
30
28
|
dirs.each do |dir|
|
31
|
-
name = File.basename(dir)
|
29
|
+
name = [options[:prefix], File.basename(dir), release.scm.version].compact.join("-")
|
32
30
|
path = Pathname.new(dir)
|
33
31
|
|
34
32
|
begin
|
@@ -38,7 +36,7 @@ module RogerThemes
|
|
38
36
|
end
|
39
37
|
|
40
38
|
::Dir.chdir(path) do
|
41
|
-
`#{options[:zip]} -r -9 "#{zipdir + name}
|
39
|
+
`#{options[:zip]} -r -9 "#{zipdir + name}.zip" rel js`
|
42
40
|
end
|
43
41
|
|
44
42
|
release.log(self, "Creating zip for custom #{name}")
|