Sha256: 1f79ebfaa68d0dde60cf84bb8f4d57deb020af615b7758dac8a3d6d6fac60e5a

Contents?: true

Size: 1.13 KB

Versions: 12

Compression:

Stored size: 1.13 KB

Contents

def version
  @version ||= begin
    plist = File.expand_path('../../Terminal Notifier/Terminal Notifier-Info.plist', __FILE__)
    `/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' '#{plist}'`.strip
  end
end

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

def zipfile
  "#{version}.zip"
end

task :clean do
  rm zipfile
  rm_rf 'vendor'
end

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

  rm_rf 'vendor'
  mkdir 'vendor'

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

  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'
end

desc 'Build gem'
task :gem => :update_build do
  sh 'gem build terminal-notifier.gemspec'
end

desc 'Run specs'
task :spec do
  sh 'bundle exec ruby spec/terminal-notifier_spec.rb'
end

task :default => :spec

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
terminal-notifier-1.7.2 vendor/terminal-notifier/Ruby/Rakefile
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/terminal-notifier-1.7.1/vendor/terminal-notifier/Ruby/Rakefile
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/terminal-notifier-1.7.1/vendor/terminal-notifier/Ruby/Rakefile
second_step-0.1.2 secondstep-notify-1.0.0-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/terminal-notifier-1.7.1/vendor/terminal-notifier/Ruby/Rakefile
terminal-notifier-1.7.1 vendor/terminal-notifier/Ruby/Rakefile
terminal-notifier-1.7.0 vendor/terminal-notifier/Ruby/Rakefile
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/terminal-notifier-1.6.3/vendor/terminal-notifier/Ruby/Rakefile
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/terminal-notifier-1.6.3/vendor/terminal-notifier/Ruby/Rakefile
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/terminal-notifier-1.6.3/vendor/terminal-notifier/Ruby/Rakefile
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/terminal-notifier-1.6.3/vendor/terminal-notifier/Ruby/Rakefile
terminal-notifier-1.6.3 vendor/terminal-notifier/Ruby/Rakefile
terminal-notifier-1.6.2 vendor/terminal-notifier/Ruby/Rakefile