mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -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
@@ -4,7 +4,7 @@ require 'etc'
|
||||
require 'open3'
|
||||
|
||||
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
|
||||
CREW_VERSION ||= '1.64.3' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
CREW_VERSION ||= '1.64.4' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
|
||||
# Kernel architecture.
|
||||
KERN_ARCH ||= Etc.uname[:machine]
|
||||
@@ -189,7 +189,8 @@ unless defined?(CREW_ANITYA_PACKAGE_NAME_MAPPINGS)
|
||||
{ pkg_name: 'asdf', anitya_pkg: 'asdf-vm', comments: '' },
|
||||
{ pkg_name: 'cf', anitya_pkg: 'cf', comments: 'Prefer to Github' },
|
||||
{ pkg_name: 'cvs', anitya_pkg: 'cvs-stable', comments: '' },
|
||||
{ pkg_name: 'py3_atspi', anitya_pkg: 'pyatspi', comments: '' }
|
||||
{ pkg_name: 'py3_atspi', anitya_pkg: 'pyatspi', comments: '' },
|
||||
{ pkg_name: 'signal_desktop', anitya_pkg: 'signal', comments: '' }
|
||||
].to_h { |h| [h[:pkg_name], h[:anitya_pkg]] }
|
||||
end
|
||||
|
||||
|
||||
@@ -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