pkgforge 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pkgforge +16 -9
- data/lib/pkgforge.rb +1 -1
- data/lib/pkgforge/components/cleanup.rb +4 -1
- data/lib/pkgforge/version.rb +1 -1
- 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: 3ccf45b2f1aa339756289d6b921f1a35bd447753
|
4
|
+
data.tar.gz: 6b8cbb6bbd16cb3421205c4f5a128399512b0db7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70f568236db34d78589dfd4dd6777672e7613ff3442307d1c0edb0e6ad91e90802174331328dc929b7b22c73e11965a438ec2014a952206fe0e76e8ec1c81356
|
7
|
+
data.tar.gz: e16b283f25e3c4e74395b676cc43d97bef886d4681c53e988faa3ec8b81d15d7e6ab2b3ea9cfa9166facac601a1131bacf3227452fbde15c61c5785c709919ae
|
data/bin/pkgforge
CHANGED
@@ -8,6 +8,7 @@ FILE_NAME = '.pkgforge'.freeze
|
|
8
8
|
def add_common_opts(cmd)
|
9
9
|
# rubocop:disable Metrics/LineLength
|
10
10
|
cmd.option :directory, '-d DIR', '--directory DIR', 'Change to directory before loading'
|
11
|
+
cmd.option :skipcleanup, '-s', '--skipcleanup', 'Skip cleanup of tmpdirs and tmpfiles'
|
11
12
|
# rubocop:enable Metrics/LineLength
|
12
13
|
end
|
13
14
|
|
@@ -32,10 +33,13 @@ Mercenary.program(:pkgforge) do |p|
|
|
32
33
|
|
33
34
|
c.action do |_, options|
|
34
35
|
run_on_file(options) do |forge|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
begin
|
37
|
+
forge.build!
|
38
|
+
forge.test!
|
39
|
+
forge.package!
|
40
|
+
ensure
|
41
|
+
forge.cleanup! unless options[:skipcleanup]
|
42
|
+
end
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
@@ -47,11 +51,14 @@ Mercenary.program(:pkgforge) do |p|
|
|
47
51
|
|
48
52
|
c.action do |_, options|
|
49
53
|
run_on_file(options) do |forge|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
54
|
+
begin
|
55
|
+
forge.build!
|
56
|
+
forge.test!
|
57
|
+
forge.package!
|
58
|
+
forge.push!
|
59
|
+
ensure
|
60
|
+
forge.cleanup! unless options[:skipcleanup]
|
61
|
+
end
|
55
62
|
end
|
56
63
|
end
|
57
64
|
end
|
data/lib/pkgforge.rb
CHANGED
@@ -14,7 +14,7 @@ require 'pkgforge/components/run'
|
|
14
14
|
require 'pkgforge/components/source'
|
15
15
|
require 'pkgforge/components/test'
|
16
16
|
require 'pkgforge/components/upload'
|
17
|
-
|
17
|
+
require 'pkgforge/components/cleanup'
|
18
18
|
##
|
19
19
|
# DSL engine for compiling Arch packages
|
20
20
|
module PkgForge
|
@@ -8,9 +8,12 @@ module PkgForge
|
|
8
8
|
def cleanup!
|
9
9
|
@tmpdirs ||= {}
|
10
10
|
@tmpfiles ||= {}
|
11
|
-
|
11
|
+
tmpfiles = @tmpfiles.dup
|
12
|
+
tmpfiles.delete(:tarball)
|
13
|
+
paths = [tmpfiles.values, @tmpdirs.values].flatten
|
12
14
|
puts "Cleaning up tmp paths: #{paths}"
|
13
15
|
FileUtils.rm_r paths
|
16
|
+
nil
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
data/lib/pkgforge/version.rb
CHANGED