lib/choctop/appcast.rb in choctop-0.13.1 vs lib/choctop/appcast.rb in choctop-0.14.0
- old
+ new
@@ -42,13 +42,15 @@
f << xml_string
end
end
def make_dmg_symlink
- FileUtils.chdir(build_path) do
- `rm '#{versionless_pkg_name}'`
- `ln -s '#{pkg_name}' '#{versionless_pkg_name}'`
+ if pkg_name != versionless_pkg_name
+ FileUtils.chdir(build_path) do
+ `rm '#{versionless_pkg_name}'`
+ `ln -s '#{pkg_name}' '#{versionless_pkg_name}'`
+ end
end
end
def make_index_redirect
File.open("#{build_path}/index.php", 'w') do |f|
@@ -61,12 +63,14 @@
return false if Dir['*.xcodeproj'].size > 0
true
end
def make_release_notes
- File.open("#{build_path}/#{release_notes}", "w") do |f|
- template = File.read(release_notes_template)
- f << ERB.new(template).result(binding)
+ if File.exist?(release_notes_template)
+ File.open("#{build_path}/#{release_notes}", "w") do |f|
+ template = File.read(release_notes_template)
+ f << ERB.new(template).result(binding)
+ end
end
end
def release_notes_content
if File.exists?("release_notes.txt")
\ No newline at end of file