Fix dmd calls to SlackBuilder module functions

This commit is contained in:
Eugen Wissner 2023-05-18 21:40:59 +02:00
parent bae3b8e90e
commit 04b24eeb99
Signed by: belka
GPG Key ID: A27FDC1E8EE902C0
2 changed files with 13 additions and 11 deletions

View File

@ -14,9 +14,9 @@ require_relative 'lib/download'
task :dmd, [:version] do |_, arguments| task :dmd, [:version] do |_, arguments|
raise 'Version is not specified.' unless arguments.key? :version raise 'Version is not specified.' unless arguments.key? :version
dub_version = '1.30.0' dub_version = '1.32.1'
dscanner_version = '0.12.2' dscanner_version = '0.14.0'
dcd_version = '0.13.6' dcd_version = '0.15.2'
SlackBuilder::DmdTools.update_dmd arguments[:version] SlackBuilder::DmdTools.update_dmd arguments[:version]
SlackBuilder::DmdTools.update_tools arguments[:version], dub_version, dscanner_version, dcd_version SlackBuilder::DmdTools.update_tools arguments[:version], dub_version, dscanner_version, dcd_version

View File

@ -44,10 +44,12 @@ module SlackBuilder
private_class_method def self.write_tools_info(package, dub_version, dscanner_version, dcd_version, checksum) private_class_method def self.write_tools_info(package, dub_version, dscanner_version, dcd_version, checksum)
write_info package, write_info package,
downloads: [ downloads: [
Download.new(hosted_sources("/d-tools/dub-#{dub_version}.tar.gz"), checksum[:dub]), Download.new(SlackBuilder.hosted_sources("/d-tools/dub-#{dub_version}.tar.gz"), checksum[:dub]),
Download.new(hosted_sources("/d-tools/tools-#{package.version}.tar.gz"), checksum[:tools]), Download.new(SlackBuilder.hosted_sources("/d-tools/tools-#{package.version}.tar.gz"), checksum[:tools]),
Download.new(hosted_sources("/d-tools/D-Scanner-#{dscanner_version}.tar.xz"), checksum[:dscanner]), Download.new(
Download.new(hosted_sources("/d-tools/DCD-#{dcd_version}.tar.xz"), checksum[:dcd]) SlackBuilder.hosted_sources("/d-tools/D-Scanner-#{dscanner_version}.tar.xz"), checksum[:dscanner]
),
Download.new(SlackBuilder.hosted_sources("/d-tools/DCD-#{dcd_version}.tar.xz"), checksum[:dcd])
] ]
end end
@ -55,14 +57,14 @@ module SlackBuilder
checksum = {} checksum = {}
uri = URI "https://codeload.github.com/dlang/tools/tar.gz/v#{version}" uri = URI "https://codeload.github.com/dlang/tools/tar.gz/v#{version}"
checksum[:tools] = download_and_deploy uri, "development/d-tools/tools-#{version}.tar.gz" checksum[:tools] = SlackBuilder.download_and_deploy uri, "development/d-tools/tools-#{version}.tar.gz"
uri = URI "https://codeload.github.com/dlang/dub/tar.gz/v#{dub_version}" uri = URI "https://codeload.github.com/dlang/dub/tar.gz/v#{dub_version}"
checksum[:dub] = download_and_deploy uri, "development/d-tools/dub-#{dub_version}.tar.gz" checksum[:dub] = SlackBuilder.download_and_deploy uri, "development/d-tools/dub-#{dub_version}.tar.gz"
checksum[:dscanner] = clone 'https://github.com/dlang-community/D-Scanner.git', checksum[:dscanner] = SlackBuilder.clone 'https://github.com/dlang-community/D-Scanner.git',
"development/d-tools/D-Scanner-#{dscanner_version}.tar.xz" "development/d-tools/D-Scanner-#{dscanner_version}.tar.xz"
checksum[:dcd] = clone 'https://github.com/dlang-community/DCD.git', checksum[:dcd] = SlackBuilder.clone 'https://github.com/dlang-community/DCD.git',
"development/d-tools/DCD-#{dcd_version}.tar.xz" "development/d-tools/DCD-#{dcd_version}.tar.xz"
checksum checksum