Pass composer version as task argument

This commit is contained in:
Eugen Wissner 2022-04-26 17:09:26 +02:00
parent 0eb60aad4d
commit 88885f0cf7
Signed by: belka
GPG Key ID: A27FDC1E8EE902C0

View File

@ -72,20 +72,17 @@ task :dmd do
commit 'development/d-tools', version commit 'development/d-tools', version
end end
task :composer do task :composer, [:version] do |_, arguments|
version = '2.0.11'
package = Package.new 'development/composer', package = Package.new 'development/composer',
version: version, version: arguments[:version],
homepage: 'https://getcomposer.org/' homepage: 'https://getcomposer.org/'
uri = URI "https://getcomposer.org/download/#{version}/composer.phar" uri = "https://getcomposer.org/download/#{arguments[:version]}/composer.phar"
checksum = download uri, 'slackbuilds/development/composer/composer.phar' checksum = download URI(uri), 'slackbuilds/development/composer/composer.phar'
write_info package, write_info package, downloads: [Download.new(uri, checksum.hexdigest)]
downloads: [Download.new("https://getcomposer.org/download/#{version}/composer.phar", checksum.hexdigest)] update_slackbuild_version 'development/composer', arguments[:version]
update_slackbuild_version 'development/composer', version
commit 'development/composer', version commit 'development/composer', arguments[:version]
end end
task 'universal-ctags' do task 'universal-ctags' do