Class: VPL::Updater
- Inherits:
-
Object
- Object
- VPL::Updater
- Defined in:
- lib/vcpkg_pipeline/core/updater.rb
Overview
VPL::Updater
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#scanner ⇒ Object
Returns the value of attribute scanner.
Instance Method Summary collapse
-
#initialize(path) ⇒ Updater
constructor
A new instance of Updater.
- #update_all(version = nil, output_path = nil) ⇒ Object
- #update_cmake ⇒ Object
- #update_git ⇒ Object
- #update_spec(version = nil) ⇒ Object
- #update_vcport(output_path = nil) ⇒ Object
- #update_vcport_portfile(output_path = nil) ⇒ Object
- #update_vcport_vcpkg ⇒ Object
Constructor Details
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
10 11 12 |
# File 'lib/vcpkg_pipeline/core/updater.rb', line 10 def path @path end |
#scanner ⇒ Object
Returns the value of attribute scanner.
10 11 12 |
# File 'lib/vcpkg_pipeline/core/updater.rb', line 10 def scanner @scanner end |
Instance Method Details
#update_all(version = nil, output_path = nil) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/vcpkg_pipeline/core/updater.rb', line 54 def update_all(version = nil, output_path = nil) @scanner.git.reset update_spec(version) @scanner.git.add('*.vplspec') update_cmake @scanner.git.add('CMakeLists.txt') update_vcport(output_path) @scanner.git.add('vcport') @scanner.git.commit(@scanner.cmake.version) update_git end |
#update_cmake ⇒ Object
22 23 24 25 26 |
# File 'lib/vcpkg_pipeline/core/updater.rb', line 22 def update_cmake @scanner.cmake.version_update( @scanner.spec.version ) end |
#update_git ⇒ Object
48 49 50 51 52 |
# File 'lib/vcpkg_pipeline/core/updater.rb', line 48 def update_git @scanner.git.quick_push( @scanner.spec.version ) end |
#update_spec(version = nil) ⇒ Object
17 18 19 20 |
# File 'lib/vcpkg_pipeline/core/updater.rb', line 17 def update_spec(version = nil) @scanner.spec.version_update(version) @scanner.scan_spec end |
#update_vcport(output_path = nil) ⇒ Object
43 44 45 46 |
# File 'lib/vcpkg_pipeline/core/updater.rb', line 43 def update_vcport(output_path = nil) update_vcport_vcpkg update_vcport_portfile(output_path) end |
#update_vcport_portfile(output_path = nil) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/vcpkg_pipeline/core/updater.rb', line 34 def update_vcport_portfile(output_path = nil) distfile_hash = @scanner.spec.distfile_package(output_path) @scanner.vcport.portfile.download_distfile_update( @scanner.spec.disturl, @scanner.spec.distfile_name, distfile_hash ) end |