mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
version: Stop updating packages that are not updatable. (#12445)
* Keep version checker from updating files not updatable. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add signal version. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * bump version Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
efd3f38245
commit
32c39760df
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env ruby
|
||||
# version.rb version 1.8 (for Chromebrew)
|
||||
# version.rb version 1.9 (for Chromebrew)
|
||||
|
||||
OPTIONS = %w[-h --help -j --json -u --update-package-files -v --verbose]
|
||||
|
||||
@@ -56,6 +56,7 @@ def get_version(name, homepage, source)
|
||||
url_parts = url.path.split('/')
|
||||
unless url_parts.count < 3
|
||||
repo = "#{url_parts[1]}/#{url_parts[2].gsub(/.git\z/, '')}"
|
||||
puts "GitHub Repo is #{repo}" if VERBOSE
|
||||
# Note that we only check releases on GitHub since semantic
|
||||
# version ordering isn't easy to get from tags.
|
||||
# You can get the last numeric tag using:
|
||||
@@ -264,7 +265,7 @@ if filelist.length.positive?
|
||||
unless upstream_version.nil?
|
||||
versions_updated[@pkg.name.to_sym] = 'Up to date.' if (Libversion.version_compare2(PackageUtils.get_clean_version(@pkg.version), upstream_version) >= 0) && versions_updated[@pkg.name.to_sym] != 'Not Found.'
|
||||
if Libversion.version_compare2(PackageUtils.get_clean_version(@pkg.version), upstream_version) == -1
|
||||
if UPDATE_PACKAGE_FILES && !@pkg.name[/#{CREW_AUTOMATIC_VERSION_UPDATE_EXCLUSION_REGEX}/] && updatable_pkg[@pkg.name.to_sym]
|
||||
if UPDATE_PACKAGE_FILES && !@pkg.name[/#{CREW_AUTOMATIC_VERSION_UPDATE_EXCLUSION_REGEX}/] && updatable_pkg[@pkg.name.to_sym] == 'Yes'
|
||||
file = File.read(filename)
|
||||
if file.sub!(PackageUtils.get_clean_version(@pkg.version), upstream_version.chomp).nil?
|
||||
versions_updated[@pkg.name.to_sym] = false
|
||||
|
||||
Reference in New Issue
Block a user