Make v prefix default for tags
This commit is contained in:
parent
47e6c49ae2
commit
e0b98189eb
20
Rakefile
20
Rakefile
@ -10,6 +10,7 @@ require 'open3'
|
||||
require_relative 'config/config'
|
||||
require_relative 'lib/package'
|
||||
require_relative 'lib/download'
|
||||
require_relative 'lib/up2date'
|
||||
|
||||
task :dmd, [:version] do |_, arguments|
|
||||
raise 'Version is not specified.' unless arguments.key? :version
|
||||
@ -135,3 +136,22 @@ task 'rdiff-backup', [:version] do |_, arguments|
|
||||
|
||||
commit 'system/rdiff-backup', arguments[:version]
|
||||
end
|
||||
|
||||
php_transform = proc do |version|
|
||||
version.delete_prefix 'php-' if version.match?(/^php-8\.2\.[[:digit:]+]$/)
|
||||
end
|
||||
|
||||
AUTO_UPDATABLE = {
|
||||
'universal-ctags' => SlackBuilder::GitHub.new('universal-ctags', 'ctags'),
|
||||
'composer' => SlackBuilder::Packagist.new('composer', 'composer'),
|
||||
'php82' => SlackBuilder::GitHub.new('php', 'php-src', php_transform),
|
||||
'rdiff-backup' => SlackBuilder::GitHub.new('rdiff-backup', 'rdiff-backup'),
|
||||
'librsync' => SlackBuilder::GitHub.new('librsync', 'librsync'),
|
||||
'jitsi-meet-desktop' => SlackBuilder::GitHub.new('jitsi', 'jitsi-meet-electron')
|
||||
}.freeze
|
||||
|
||||
task :up2date do
|
||||
AUTO_UPDATABLE.each do |key, value|
|
||||
latest_version = SlackBuilder.check_for_latest key, value
|
||||
end
|
||||
end
|
||||
|
@ -35,7 +35,7 @@ module SlackBuilder
|
||||
GQL
|
||||
private_constant :GITHUB_QUERY
|
||||
|
||||
def initialize(owner, name, version_transform = ->(x) { x })
|
||||
def initialize(owner, name, version_transform = ->(v) { v.delete_prefix 'v' })
|
||||
super()
|
||||
|
||||
@owner = owner
|
||||
|
Loading…
Reference in New Issue
Block a user