Class: Packaging::Configuration
- Inherits:
-
Object
- Object
- Packaging::Configuration
- Includes:
- Singleton
- Defined in:
- lib/packaging/configuration.rb
Instance Attribute Summary collapse
-
#exclude_files ⇒ Object
array of files excluded for packaging.
-
#include_files ⇒ Object
array of files included for packaging (useful for e.g. for generated file not in git.
-
#maintenance_mode ⇒ Object
Specify if project is in maintenance mode.
-
#obs_api ⇒ Object
path to OBS api, useful if package is build in own instance of build service.
-
#obs_project ⇒ Object
project name in OBS.
-
#obs_sr_project ⇒ Object
Project name in BS where submit request should go.
-
#obs_target ⇒ Object
obs build target, by default opensuse factory.
- #package_dir ⇒ Object
- #package_name ⇒ Object
-
#skip_license_check ⇒ Object
additional list of regex to skip license check.
- #version ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 29 30 31 32 33 |
# File 'lib/packaging/configuration.rb', line 26 def initialize @exclude_files = [] @include_files = [] @obs_api = "https://api.opensuse.org/" @obs_target = "openSUSE_Factory" @skip_license_check = [] @maintenance_mode = false end |
Instance Attribute Details
#exclude_files ⇒ Object
array of files excluded for packaging
42 43 44 |
# File 'lib/packaging/configuration.rb', line 42 def exclude_files @exclude_files end |
#include_files ⇒ Object
recommended way is to generate in spec and not before package
array of files included for packaging (useful for e.g. for generated file not in git
48 49 50 |
# File 'lib/packaging/configuration.rb', line 48 def include_files @include_files end |
#maintenance_mode ⇒ Object
Specify if project is in maintenance mode. If so, then it create maintenance request instead of pull request
60 61 62 |
# File 'lib/packaging/configuration.rb', line 60 def maintenance_mode @maintenance_mode end |
#obs_api ⇒ Object
path to OBS api, useful if package is build in own instance of build service. By default api.opensuse.org
54 55 56 |
# File 'lib/packaging/configuration.rb', line 54 def obs_api @obs_api end |
#obs_project ⇒ Object
project name in OBS
50 51 52 |
# File 'lib/packaging/configuration.rb', line 50 def obs_project @obs_project end |
#obs_sr_project ⇒ Object
Project name in BS where submit request should go
52 53 54 |
# File 'lib/packaging/configuration.rb', line 52 def obs_sr_project @obs_sr_project end |
#obs_target ⇒ Object
obs build target, by default opensuse factory
56 57 58 |
# File 'lib/packaging/configuration.rb', line 56 def obs_target @obs_target end |
#package_dir ⇒ Object
66 67 68 |
# File 'lib/packaging/configuration.rb', line 66 def package_dir @package_dir ||= "package" end |
#package_name ⇒ Object
62 63 64 |
# File 'lib/packaging/configuration.rb', line 62 def package_name @package_name ||= Dir.pwd.split("/").last end |
#skip_license_check ⇒ Object
additional list of regex to skip license check
58 59 60 |
# File 'lib/packaging/configuration.rb', line 58 def skip_license_check @skip_license_check end |
#version ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/packaging/configuration.rb', line 70 def version return @version if @version # try find version file versions = Dir.glob("version", File::FNM_CASEFOLD) return @version = File.read(versions.first).strip unless versions.empty? raise "cannot find version" #TODO more heuristic end |