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.
-
#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 |
# 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 = [] end |
Instance Attribute Details
#exclude_files ⇒ Object
array of files excluded for packaging
41 42 43 |
# File 'lib/packaging/configuration.rb', line 41 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
47 48 49 |
# File 'lib/packaging/configuration.rb', line 47 def include_files @include_files end |
#obs_api ⇒ Object
path to OBS api, useful if package is build in own instance of build service. By default api.opensuse.org
53 54 55 |
# File 'lib/packaging/configuration.rb', line 53 def obs_api @obs_api end |
#obs_project ⇒ Object
project name in OBS
49 50 51 |
# File 'lib/packaging/configuration.rb', line 49 def obs_project @obs_project end |
#obs_sr_project ⇒ Object
Project name in BS where submit request should go
51 52 53 |
# File 'lib/packaging/configuration.rb', line 51 def obs_sr_project @obs_sr_project end |
#obs_target ⇒ Object
obs build target, by default opensuse factory
55 56 57 |
# File 'lib/packaging/configuration.rb', line 55 def obs_target @obs_target end |
#package_dir ⇒ Object
63 64 65 |
# File 'lib/packaging/configuration.rb', line 63 def package_dir @package_dir ||= "package" end |
#package_name ⇒ Object
59 60 61 |
# File 'lib/packaging/configuration.rb', line 59 def package_name @package_name ||= Dir.pwd.split("/").last end |
#skip_license_check ⇒ Object
additional list of regex to skip license check
57 58 59 |
# File 'lib/packaging/configuration.rb', line 57 def skip_license_check @skip_license_check end |
#version ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/packaging/configuration.rb', line 67 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 |