Skip to content

Commit 42e150e

Browse files
committed
Make gem building work on all platforms.
1 parent 85a1842 commit 42e150e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Ruby/Rakefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def version
66
end
77

88
def filename
9-
"terminal-notifier_#{version}"
9+
"terminal-notifier-#{version}"
1010
end
1111

1212
def zipfile
@@ -18,9 +18,10 @@ task :clean do
1818
rm_rf "vendor"
1919
end
2020

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

2627
rm_rf "vendor"

Ruby/terminal-notifier.gemspec

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# -*- encoding: utf-8 -*-
22
plist = File.expand_path('../../Terminal Notifier/Terminal Notifier-Info.plist', __FILE__)
3-
#version = `/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' '#{plist}'`.strip
4-
#at least allow rake spec to run and fail on Linux
5-
version = '1.4.2'
3+
# Also run on non-OSX machines, otherwise bundle installs directly from the repo will fail.
4+
# version = `/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' '#{plist}'`.strip
5+
version = File.read(plist).match(%r{<string>(\d+\.\d+\.\d+)</string>})[1]
6+
67

78
Gem::Specification.new do |gem|
89
gem.name = "terminal-notifier"
910
gem.version = version
10-
gem.summary = 'Send User Notifications on Mac OS X 10.8.'
11+
gem.summary = 'Send User Notifications on Mac OS X 10.8 or higher.'
1112
gem.authors = ["Eloy Duran"]
1213
gem.email = ["[email protected]"]
1314
gem.homepage = 'https://github.com/alloy/terminal-notifier'

0 commit comments

Comments
 (0)