Skip to content

Commit

Permalink
Update Ruby build for command-line app
Browse files Browse the repository at this point in the history
  • Loading branch information
julienXX committed May 13, 2017
1 parent ae4e72a commit aa2b032
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Ruby/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ task :update_build do
mkdir 'vendor'

sh "unzip -o -d vendor #{zipfile}"
mv "vendor/#{filename}", 'vendor/terminal-notifier'
mv "vendor/#{filename}", 'vendor/terminal-notifier-src'

sh 'cd .. && xcodebuild -target terminal-notifier SYMROOT=build -verbose && cd -'
mv '../build/Release/terminal-notifier.app', 'vendor/terminal-notifier/'
chmod 0755, 'vendor/terminal-notifier/terminal-notifier.app/Contents/MacOS/terminal-notifier'
mv '../build/Release/terminal-notifier', 'vendor'
chmod 0755, 'vendor/terminal-notifier'
end

desc 'Build gem'
Expand Down
3 changes: 2 additions & 1 deletion Ruby/lib/terminal-notifier.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# coding: utf-8
require 'shellwords'
require 'rbconfig'

module TerminalNotifier
BIN_PATH = File.expand_path('../../vendor/terminal-notifier/terminal-notifier.app/Contents/MacOS/terminal-notifier', __FILE__)
BIN_PATH = File.expand_path('../../vendor/terminal-notifier', __FILE__)

class UnsupportedPlatformError < StandardError; end
# Returns wether or not the current platform is Mac OS X 10.10, or higher.
Expand Down
4 changes: 2 additions & 2 deletions Ruby/terminal-notifier.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
plist = File.expand_path('../../Terminal Notifier/Terminal Notifier-Info.plist', __FILE__)
plist = File.expand_path('../../Terminal Notifier/Info.plist', __FILE__)
# 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]
Expand All @@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
gem.license = 'MIT'

gem.executables = ['terminal-notifier']
gem.files = ['bin/terminal-notifier', 'lib/terminal-notifier.rb'] + Dir.glob('vendor/terminal-notifier/**/*')
gem.files = ['bin/terminal-notifier', 'lib/terminal-notifier.rb', 'vendor/terminal-notifier']
gem.require_paths = ['lib']

gem.extra_rdoc_files = ['README.markdown']
Expand Down

0 comments on commit aa2b032

Please sign in to comment.