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
end
task :composer do
version = '2.0.11'
task :composer, [:version] do |_, arguments|
package = Package.new 'development/composer',
version: version,
version: arguments[:version],
homepage: 'https://getcomposer.org/'
uri = URI "https://getcomposer.org/download/#{version}/composer.phar"
checksum = download uri, 'slackbuilds/development/composer/composer.phar'
write_info package,
downloads: [Download.new("https://getcomposer.org/download/#{version}/composer.phar", checksum.hexdigest)]
update_slackbuild_version 'development/composer', version
uri = "https://getcomposer.org/download/#{arguments[:version]}/composer.phar"
checksum = download URI(uri), 'slackbuilds/development/composer/composer.phar'
write_info package, downloads: [Download.new(uri, checksum.hexdigest)]
update_slackbuild_version 'development/composer', arguments[:version]
commit 'development/composer', version
commit 'development/composer', arguments[:version]
end
task 'universal-ctags' do