lib/kde_frameworks_release.rb in inqlude-0.7.0 vs lib/kde_frameworks_release.rb in inqlude-0.7.1
- old
+ new
@@ -20,23 +20,24 @@
def initialize handler
@handler = handler
end
+ def self.strip_patch_release(version)
+ version =~ /^(\d+\.\d+)\./
+ $1
+ end
+
def self.create_release_manifest generic_manifest, release_date, version
- m = generic_manifest
- name = m["name"]
- download_url = "http://download.kde.org/stable/frameworks/#{version}/"
- m["$schema"] = Manifest.release_schema_id
- m["schema_type"] = "release"
- m["urls"]["download"] = download_url
- m["maturity"] = "stable"
- m["release_date"] = release_date
- m["version"] = version
- m["packages"] = {
- "source" => "#{download_url}#{name}-#{version}.tar.xz"
- }
+ m = generic_manifest.create_release_manifest(release_date, version)
+
+ version_dir = strip_patch_release(version)
+
+ download_url = "http://download.kde.org/stable/frameworks/#{version_dir}/"
+ m.urls.download = download_url
+ m.maturity = "stable"
+ m.packages.source = "#{download_url}#{m.name}-#{version}.tar.xz"
m
end
def read_generic_manifests
@generic_manifests = Array.new
@@ -51,10 +52,10 @@
@generic_manifests.each do |generic_manifest|
release_manifest = KdeFrameworksRelease.create_release_manifest(
generic_manifest, release_date, version )
path = @handler.manifest_path( release_manifest )
File.open( path, "w" ) do |file|
- file.write Manifest.to_json( release_manifest )
+ file.write release_manifest.to_json
end
end
end
end