ood_packaging 0.1.4 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c70a0f572ecbb2e7e338c08dd43009335d7552750fd5f7717f154bc637d1c1a
4
- data.tar.gz: 7f3e84f57c4f1c245f6d5daec190da5690a310c136efaf8a3732ba89ad2fed59
3
+ metadata.gz: 700861e60a7c4cbfcf42804c78d23ba5e99fc4cf143cd0a2e424144ad224cb0b
4
+ data.tar.gz: 63e75fd5b747215c0bddb937f1680bd884b6c1592808612e67541fd23e4851d6
5
5
  SHA512:
6
- metadata.gz: 9c458f0bd60de9599fed549de0602785a9a3611fda8ea61f5547aa6201bb260fc935d9ad8adb8d68a50abe7b4a6ae1b8b029b9b711ed7bec4b3ae1309103206e
7
- data.tar.gz: e0af0043f8ee483a2eea671c8849a01c941bdd71eb5ecf296c1079528a847bdf96d441ddbcb7340050303dcaaae6f571d9f96df3d2d60a9366802007f6017df9
6
+ metadata.gz: d9e1d7516304c4d40648e6ef6c9fafde08c16aa59d1614e6080282206e464fb29b65458becf79012a55e7f79ef664a309e8799cdb0dd4075819554a9fad6f10d
7
+ data.tar.gz: 806c2875b212f8186d4462422192b95ecca5bc0f9b96c722c8c4df46652186eedced6aeaf3dedce7fbb915614659a640bbe27d3bff8c5ef3d641443bffa5c65a
data/bin/ood_packaging CHANGED
@@ -2,13 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'optparse'
5
- begin
6
- require 'ood_packaging'
7
- # If gem is not installed, load from location in git repo
8
- rescue LoadError
9
- $LOAD_PATH.unshift(File.expand_path(File.join(__dir__, '../lib')))
10
- require 'ood_packaging'
11
- end
5
+ libdir = File.expand_path(File.join(__dir__, '../lib'))
6
+ $LOAD_PATH.unshift(libdir) if Dir.exist?(libdir)
7
+ require 'ood_packaging'
12
8
 
13
9
  options = {}
14
10
  OptionParser.new do |opts|
@@ -21,8 +21,6 @@ class OodPackaging::Package
21
21
  @config = config
22
22
  @config[:dist] = 'el8' if tar_only?
23
23
  @build_box = OodPackaging::BuildBox.new(config)
24
- @clean_work_dir = config[:clean_work_dir].nil? ? true : config[:clean_work_dir]
25
- @clean_output_dir = config[:clean_output_dir].nil? ? true : config[:clean_output_dir]
26
24
  raise ArgumentError, 'Package is required' if package.nil?
27
25
  raise ArgumentError, 'Version is required' if version.nil?
28
26
  raise ArgumentError, "Package #{package} is not a directory" unless Dir.exist?(package)
@@ -49,10 +47,22 @@ class OodPackaging::Package
49
47
  @work_dir ||= File.expand_path(@config[:work_dir])
50
48
  end
51
49
 
50
+ def clean_work_dir
51
+ return false if ENV['OOD_PACKAGING_CLEAN_WORK_DIR'] == 'false'
52
+
53
+ @config[:clean_work_dir].nil? ? true : @config[:clean_work_dir]
54
+ end
55
+
52
56
  def output_dir
53
57
  @output_dir ||= File.expand_path(@config[:output_dir])
54
58
  end
55
59
 
60
+ def clean_output_dir
61
+ return false if ENV['OOD_PACKAGING_CLEAN_OUTPUT_DIR'] == 'false'
62
+
63
+ @config[:clean_output_dir].nil? ? true : @config[:clean_output_dir]
64
+ end
65
+
56
66
  def package
57
67
  @config[:package]
58
68
  end
@@ -200,8 +210,8 @@ class OodPackaging::Package
200
210
  end
201
211
 
202
212
  def clean!
203
- sh "rm -rf #{work_dir}", verbose: debug if @clean_work_dir
204
- sh "rm -rf #{output_dir}", verbose: debug if @clean_output_dir
213
+ sh "rm -rf #{work_dir}", verbose: debug if clean_work_dir
214
+ sh "rm -rf #{output_dir}", verbose: debug if clean_output_dir
205
215
  end
206
216
 
207
217
  def bootstrap!
@@ -59,7 +59,7 @@ module OodPackaging::Utils
59
59
  end
60
60
 
61
61
  def ruby_version
62
- '2.7'
62
+ '3.0'
63
63
  end
64
64
 
65
65
  def scl_ruby
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Version code for OodPackaging
4
4
  module OodPackaging
5
- VERSION = '0.1.4'
5
+ VERSION = '0.2.0'
6
6
  PACKAGE_VERSION = {
7
7
  'ondemand-release' => {
8
8
  '(ubuntu|debian)' => '2.1.0',
@@ -12,7 +12,7 @@ module OodPackaging
12
12
  '(ubuntu|debian)' => '1',
13
13
  'default' => '1-6'
14
14
  },
15
- 'ondemand-runtime' => '2.1',
15
+ 'ondemand-runtime' => '2.1.1',
16
16
  'passenger' => '6.0.14',
17
17
  'cjose' => '0.6.1',
18
18
  'mod_auth_openidc' => '2.4.5',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ood_packaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trey Dockendorf
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-05-24 00:00:00.000000000 Z
12
+ date: 2022-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.1.2
116
+ rubygems_version: 3.2.33
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Open OnDemand packaging library