From 5d74891927af078cf487c5b516e6c02f0a66f977 Mon Sep 17 00:00:00 2001 From: Amory Meltzer Date: Sat, 9 Jan 2016 09:31:15 -0800 Subject: [PATCH 1/2] Update cleanmymac to 3.3 and 2.4 Add appcast shasum for 2.4 and appcast+shasum for 3.3 --- Casks/cleanmymac.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Casks/cleanmymac.rb b/Casks/cleanmymac.rb index c6aabd37e7f3..47963b4f5816 100644 --- a/Casks/cleanmymac.rb +++ b/Casks/cleanmymac.rb @@ -10,11 +10,12 @@ app 'CleanMyMac.app' # TODO: add uninstall and zap stanzas for legacy app elsif MacOS.release <= :lion - version '2.3.5-1427986644' - sha256 '16e192edcf58f25c6763349ef0e5194268bec4d000912b64b34f5897b4784097' + version '2.4-1443544143' + sha256 '0d08f4d9b36493359f6ca3ff2f96a9b769a8eed4ea017ecbb2d5644f75aafad0' # devmate.com is the official download host per the appcast feed url "https://dl.devmate.com/com.macpaw.CleanMyMac2/#{version.sub(%r{-.*$}, '')}/#{version.sub(%r{.*?-}, '')}/CleanMyMac#{version.to_i}-#{version.sub(%r{-.*$}, '')}.zip" - appcast "http://updates.devmate.com/com.macpaw.CleanMyMac#{version.to_i}.xml" + appcast "http://updates.devmate.com/com.macpaw.CleanMyMac#{version.to_i}.xml", + :sha256 => '612be3e443f49b6b1d5539611693714b2897b9b774896ac15c048daec76a34cb' app "CleanMyMac #{version.to_i}.app" uninstall :launchctl => "com.macpaw.CleanMyMac#{version.to_i}.Agent" @@ -32,11 +33,13 @@ "~/Library/Preferences/com.macpaw.CleanMyMac#{version.to_i}.plist", ] else - version '3.2.1-1448556223' - sha256 'a5e7587d7edcece90c0d5b0b6aed8d008b6a1a93cb6911f0cf2e9e0c0453e6c4' + version '3.3.0-1451475053' + sha256 '14038d3554f771e32840dbd0936235d62b95713638b4b1ca94daf32847da389f' # devmate.com is the official download host per the appcast feed url "https://dl.devmate.com/com.macpaw.CleanMyMac#{version.to_i}/#{version.sub(%r{-.*$}, '')}/#{version.sub(%r{.*?-}, '')}/CleanMyMac3-#{version.sub(%r{-.*$}, '')}.zip" + appcast "http://updates.devmate.com/com.macpaw.CleanMyMac#{version.to_i}.xml", + :sha256 => 'e62a4026c55f52a3c31a0070e8fb9d49c63244697dff9332a3ab37f74d02c5aa' app "CleanMyMac #{version.to_i}.app" postflight do From 7352e42a492b86d6e313930a25cc50da9c3953a8 Mon Sep 17 00:00:00 2001 From: Amory Meltzer Date: Sat, 9 Jan 2016 09:43:41 -0800 Subject: [PATCH 2/2] Use new version methods in cleanmymac --- Casks/cleanmymac.rb | 69 +++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/Casks/cleanmymac.rb b/Casks/cleanmymac.rb index 47963b4f5816..93a81d664726 100644 --- a/Casks/cleanmymac.rb +++ b/Casks/cleanmymac.rb @@ -1,66 +1,67 @@ cask 'cleanmymac' do if MacOS.release <= :snow_leopard - version '1.11-1417522595' + version '1.11,1417522595' sha256 'ac5d4bf36882dd34bdb0a68eb384a6b3aba355be896d03dfa40a120c6bef4a0d' # devmate.com is the official download host per the appcast feed - url "https://dl.devmate.com/com.macpaw.CleanMyMac/#{version.sub(%r{-.*$}, '')}/#{version.sub(%r{.*?-}, '')}/CleanMyMacClassic-#{version.sub(%r{-.*$}, '')}.zip" + url "https://dl.devmate.com/com.macpaw.CleanMyMac/#{version.major_minor}/#{version.after_comma}/CleanMyMacClassic-#{version.major_minor}.zip" appcast 'http://updates.devmate.com/com.macpaw.CleanMyMac.xml', :sha256 => '13bbf950696a9410fec848e80652f2826209b347fdb329b117371e25445951f5' app 'CleanMyMac.app' # TODO: add uninstall and zap stanzas for legacy app elsif MacOS.release <= :lion - version '2.4-1443544143' + version '2.4,1443544143' sha256 '0d08f4d9b36493359f6ca3ff2f96a9b769a8eed4ea017ecbb2d5644f75aafad0' + # devmate.com is the official download host per the appcast feed - url "https://dl.devmate.com/com.macpaw.CleanMyMac2/#{version.sub(%r{-.*$}, '')}/#{version.sub(%r{.*?-}, '')}/CleanMyMac#{version.to_i}-#{version.sub(%r{-.*$}, '')}.zip" - appcast "http://updates.devmate.com/com.macpaw.CleanMyMac#{version.to_i}.xml", + url "https://dl.devmate.com/com.macpaw.CleanMyMac2/#{version.major_minor_patch}/#{version.after_comma}/CleanMyMac#{version.to_i}-#{version.major_minor_patch}.zip" + appcast "http://updates.devmate.com/com.macpaw.CleanMyMac#{version.major}.xml", :sha256 => '612be3e443f49b6b1d5539611693714b2897b9b774896ac15c048daec76a34cb' - app "CleanMyMac #{version.to_i}.app" + app "CleanMyMac #{version.major}.app" - uninstall :launchctl => "com.macpaw.CleanMyMac#{version.to_i}.Agent" + uninstall :launchctl => "com.macpaw.CleanMyMac#{version.major}.Agent" zap :delete => [ - "/Library/LaunchDaemons/com.macpaw.CleanMyMac#{version.to_i}.Agent.plist", - "/Library/PrivilegedHelperTools/com.macpaw.CleanMyMac#{version.to_i}.Agent", - "/Users/Shared/CleanMyMac #{version.to_i}", - "/private/var/run/com.macpaw.CleanMyMac#{version.to_i}.Agent.socket", - "~/Library/Application Support/CleanMyMac #{version.to_i}", - "~/Library/Caches/CleanMyMac #{version.to_i}", - "~/Library/Logs/CleanMyMac #{version.to_i}.log", - "~/Library/Preferences/com.macpaw.CleanMyMac-#{version.to_i}-Helper.plist", - "~/Library/Preferences/com.macpaw.CleanMyMac#{version.to_i}.KnowledgeBase.plist", - "~/Library/Preferences/com.macpaw.CleanMyMac#{version.to_i}.plist", + "/Library/LaunchDaemons/com.macpaw.CleanMyMac#{version.major}.Agent.plist", + "/Library/PrivilegedHelperTools/com.macpaw.CleanMyMac#{version.major}.Agent", + "/Users/Shared/CleanMyMac #{version.major}", + "/private/var/run/com.macpaw.CleanMyMac#{version.major}.Agent.socket", + "~/Library/Application Support/CleanMyMac #{version.major}", + "~/Library/Caches/CleanMyMac #{version.major}", + "~/Library/Logs/CleanMyMac #{version.major}.log", + "~/Library/Preferences/com.macpaw.CleanMyMac-#{version.major}-Helper.plist", + "~/Library/Preferences/com.macpaw.CleanMyMac#{version.major}.KnowledgeBase.plist", + "~/Library/Preferences/com.macpaw.CleanMyMac#{version.major}.plist", ] else - version '3.3.0-1451475053' + version '3.3.0,1451475053' sha256 '14038d3554f771e32840dbd0936235d62b95713638b4b1ca94daf32847da389f' # devmate.com is the official download host per the appcast feed - url "https://dl.devmate.com/com.macpaw.CleanMyMac#{version.to_i}/#{version.sub(%r{-.*$}, '')}/#{version.sub(%r{.*?-}, '')}/CleanMyMac3-#{version.sub(%r{-.*$}, '')}.zip" - appcast "http://updates.devmate.com/com.macpaw.CleanMyMac#{version.to_i}.xml", + url "https://dl.devmate.com/com.macpaw.CleanMyMac#{version.major}/#{version.major_minor_patch}/#{version.after_comma}/CleanMyMac3-#{version.major_minor_patch}.zip" + appcast "http://updates.devmate.com/com.macpaw.CleanMyMac#{version.major}.xml", :sha256 => 'e62a4026c55f52a3c31a0070e8fb9d49c63244697dff9332a3ab37f74d02c5aa' - app "CleanMyMac #{version.to_i}.app" + app "CleanMyMac #{version.major}.app" postflight do suppress_move_to_applications end - uninstall :launchctl => "com.macpaw.CleanMyMac#{version.to_i}.Agent" + uninstall :launchctl => "com.macpaw.CleanMyMac#{version.major}.Agent" zap :delete => [ - "/Library/LaunchDaemons/com.macpaw.CleanMyMac#{version.to_i}.Agent.plist", - "/Library/PrivilegedHelperTools/com.macpaw.CleanMyMac#{version.to_i}.Agent", - "/Users/Shared/CleanMyMac #{version.to_i}", - "/private/var/run/com.macpaw.CleanMyMac#{version.to_i}.Agent.socket", - "~/Library/Application Support/CleanMyMac #{version.to_i}", - "~/Library/Application Support/CleanMyMac #{version.to_i} Menu", - "~/Library/Caches/CleanMyMac #{version.to_i}", - "~/Library/Logs/CleanMyMac #{version.to_i}.log", - "~/Library/Preferences/com.macpaw.CleanMyMac-#{version.to_i}-Helper.plist", - "~/Library/Preferences/com.macpaw.CleanMyMac#{version.to_i}.KnowledgeBase.plist", - "~/Library/Preferences/com.macpaw.cleanmymac#{version.to_i}.menu.plist", - "~/Library/Preferences/com.macpaw.CleanMyMac#{version.to_i}.plist", + "/Library/LaunchDaemons/com.macpaw.CleanMyMac#{version.major}.Agent.plist", + "/Library/PrivilegedHelperTools/com.macpaw.CleanMyMac#{version.major}.Agent", + "/Users/Shared/CleanMyMac #{version.major}", + "/private/var/run/com.macpaw.CleanMyMac#{version.major}.Agent.socket", + "~/Library/Application Support/CleanMyMac #{version.major}", + "~/Library/Application Support/CleanMyMac #{version.major} Menu", + "~/Library/Caches/CleanMyMac #{version.major}", + "~/Library/Logs/CleanMyMac #{version.major}.log", + "~/Library/Preferences/com.macpaw.CleanMyMac-#{version.major}-Helper.plist", + "~/Library/Preferences/com.macpaw.CleanMyMac#{version.major}.KnowledgeBase.plist", + "~/Library/Preferences/com.macpaw.cleanmymac#{version.major}.menu.plist", + "~/Library/Preferences/com.macpaw.CleanMyMac#{version.major}.plist", ] end