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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f32952353111209493b746f90c6c69dce861e07f
4
- data.tar.gz: 9fe19fe8872c2182227125e96fc0200d9e8f43e3
3
+ metadata.gz: 3ccf45b2f1aa339756289d6b921f1a35bd447753
4
+ data.tar.gz: 6b8cbb6bbd16cb3421205c4f5a128399512b0db7
5
5
  SHA512:
6
- metadata.gz: 02301c9c25723c44f689885bdda19429a98ac909f23496728d966ed69ecc9b6ad83b931f9084050b16c730e8ead9cbe724d4469ff1d73531ddbeeb6bfaee814b
7
- data.tar.gz: 4d27434c950e746a1e45259d2928b8b22825a21b90e7950ec799b4fa4479368d53efe230322813df8caf3a9b8700d7334100b3d0514c86b857c86d6ee9971514
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
- forge.build!
36
- forge.test!
37
- forge.package!
38
- forge.cleanup!
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
- forge.build!
51
- forge.test!
52
- forge.package!
53
- forge.cleanup!
54
- forge.push!
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
- paths = [@tmpfiles.values, @tmpdirs.values].flatten
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
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Declare version number
3
3
  module PkgForge
4
- VERSION = '0.8.0'.freeze
4
+ VERSION = '0.8.1'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkgforge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker