vanagon 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vanagon/platform/deb.rb +1 -2
- data/lib/vanagon/platform/windows.rb +8 -0
- data/spec/lib/vanagon/platform/windows_spec.rb +9 -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: fcd5e7e5f1f39f1955e66d77c281857454889a32
|
4
|
+
data.tar.gz: e8c58b0be17f84d4c3c589ddadc99375e05b5bb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2989af2711e652f63fa38ef1a47789c6873b8e9646d95724d2e35e2b53849067d9cd555650386c9bd34dc9debadf530253da7f0ccef3d09a1f56d0b7fd9dbf25
|
7
|
+
data.tar.gz: 18da216b1b93412c6271433db131928a625168b1345e2a2817538f6ee45da86fc96a9bec0217098d1b08ac26d8738a40ae954ce4b7e8d336785106a03412cad6
|
data/lib/vanagon/platform/deb.rb
CHANGED
@@ -7,7 +7,6 @@ class Vanagon
|
|
7
7
|
# @return [Array] list of commands required to build a debian package for the given project from a tarball
|
8
8
|
def generate_package(project)
|
9
9
|
target_dir = project.repo ? output_dir(project.repo) : output_dir
|
10
|
-
pkg_arch_opt = project.noarch ? "" : "-a #{@architecture}"
|
11
10
|
["mkdir -p output/#{target_dir}",
|
12
11
|
"mkdir -p $(tempdir)/#{project.name}-#{project.version}",
|
13
12
|
"cp #{project.name}-#{project.version}.tar.gz $(tempdir)/#{project.name}_#{project.version}.orig.tar.gz",
|
@@ -15,7 +14,7 @@ class Vanagon
|
|
15
14
|
"cp -pr debian $(tempdir)/#{project.name}-#{project.version}",
|
16
15
|
"gunzip -c #{project.name}-#{project.version}.tar.gz | '#{@tar}' -C '$(tempdir)/#{project.name}-#{project.version}' --strip-components 1 -xf -",
|
17
16
|
"sed -i 's/\ /?/g' $(tempdir)/#{project.name}-#{project.version}/debian/install",
|
18
|
-
"(cd $(tempdir)/#{project.name}-#{project.version}; debuild --no-lintian
|
17
|
+
"(cd $(tempdir)/#{project.name}-#{project.version}; debuild --no-lintian -uc -us)",
|
19
18
|
"cp $(tempdir)/*.deb ./output/#{target_dir}"]
|
20
19
|
end
|
21
20
|
|
@@ -402,6 +402,14 @@ class Vanagon
|
|
402
402
|
string
|
403
403
|
end
|
404
404
|
|
405
|
+
# Grab only the first three values from the version input
|
406
|
+
# and strip off any non-digit characters.\
|
407
|
+
#
|
408
|
+
# @param [string] version, the original version number
|
409
|
+
def windows_style_version(version)
|
410
|
+
version.split("\.").first(3).collect { |value| value.gsub(/[^0-9]/, '') }.join("\.")
|
411
|
+
end
|
412
|
+
|
405
413
|
# Constructor. Sets up some defaults for the windows platform and calls the parent constructor
|
406
414
|
#
|
407
415
|
# Mingw varies on where it is installed based on architecture. We want to use which ever is on the system.
|
@@ -68,6 +68,15 @@ HERE
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
describe '#windows_style_version' do
|
72
|
+
it "returns first three digits only" do
|
73
|
+
expect(cur_plat._platform.windows_style_version("1.0.0.1")).to eq("1.0.0")
|
74
|
+
end
|
75
|
+
|
76
|
+
it "returns only numbers" do
|
77
|
+
expect(cur_plat._platform.windows_style_version("1.0.g0")).to eq("1.0.0")
|
78
|
+
end
|
79
|
+
end
|
71
80
|
describe '#generate_msi_packaging_artifacts' do
|
72
81
|
before(:each) do
|
73
82
|
# Create Workdir and temp root directory
|