Skip to content

Commit

Permalink
Make gem building work on all platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Aug 24, 2013
1 parent 85a1842 commit 42e150e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Ruby/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def version
end

def filename
"terminal-notifier_#{version}"
"terminal-notifier-#{version}"
end

def zipfile
Expand All @@ -18,9 +18,10 @@ task :clean do
rm_rf "vendor"
end

desc "Fetch latest build from the GitHub releases"
task :update_build do
unless File.exist?(zipfile)
sh "curl -O 'http://cloud.github.com/downloads/alloy/terminal-notifier/terminal-notifier_#{version}.zip'"
sh "curl -L -O 'https://github.com/alloy/terminal-notifier/releases/download/#{version}/terminal-notifier-#{version}.zip'"
end

rm_rf "vendor"
Expand Down
9 changes: 5 additions & 4 deletions Ruby/terminal-notifier.gemspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# -*- encoding: utf-8 -*-
plist = File.expand_path('../../Terminal Notifier/Terminal Notifier-Info.plist', __FILE__)
#version = `/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' '#{plist}'`.strip
#at least allow rake spec to run and fail on Linux
version = '1.4.2'
# Also run on non-OSX machines, otherwise bundle installs directly from the repo will fail.
# version = `/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' '#{plist}'`.strip
version = File.read(plist).match(%r{<string>(\d+\.\d+\.\d+)</string>})[1]


Gem::Specification.new do |gem|
gem.name = "terminal-notifier"
gem.version = version
gem.summary = 'Send User Notifications on Mac OS X 10.8.'
gem.summary = 'Send User Notifications on Mac OS X 10.8 or higher.'
gem.authors = ["Eloy Duran"]
gem.email = ["[email protected]"]
gem.homepage = 'https://github.com/alloy/terminal-notifier'
Expand Down

0 comments on commit 42e150e

Please sign in to comment.