forked from HearthSim/HSTracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
70 lines (56 loc) · 1.98 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# -*- coding: utf-8 -*-
$:.unshift('/Library/RubyMotion/lib')
require 'motion/project/template/osx'
begin
require 'bundler'
Bundler.require
rescue LoadError
end
Motion::Project::App.setup do |app|
app.name = 'HSTracker'
app.copyright = 'Copyright © 2015 Benjamin Michotte. All rights reserved.'
app.short_version = '0.12'
app.version = `git rev-list HEAD --count`.strip
App.info 'Building version', "#{app.short_version}.#{app.version}"
# workaround to force the new version to be written in plist
# see https://github.com/HipByte/RubyMotion/issues/201
system 'touch Rakefile'
require 'dotenv'
Dotenv.load
app.release do
app.deployment_target = '10.8'
app.env['hockey_app_id'] = ENV['HOCKEY_APP']
app.sparkle do
release :base_url, "https://rink.hockeyapp.net/api/2/apps/#{ENV['HOCKEY_APP']}"
release :feed_base_url, 'https://rink.hockeyapp.net/api/2/apps/'
release :feed_filename, ENV['HOCKEY_APP']
end
end
app.development do
app.deployment_target = '10.9'
app.sparkle do
release :base_url, 'https://github.com/bmichotte/HSTracker'
end
end
App.info 'Building for target', app.deployment_target
app.identifier = 'be.michotte.hstracker'
app.codesign_certificate = ENV['CODE_SIGN'] || nil
app.icon = 'Icon.icns'
app.info_plist['ATSApplicationFontsPath'] = 'fonts/'
app.frameworks = %w(AppKit Foundation CoreGraphics CoreServices CoreData WebKit Cocoa QuartzCore Security SystemConfiguration)
app.pods do
pod 'GDataXML-HTML'
pod 'MASPreferences'
pod 'JNWCollectionView'
pod 'HockeySDK-Mac'
end
end
task :run => :localize
task :run => :'schema:build'
task :publish => :'archive' do
desc 'Generate HSTracker.dmg and release to Github'
config = Motion::Project::App.config
Motion::Project::App.info 'Building', 'archive'
Motion::Project::App.info 'Releasing', "version #{config.short_version}"
sh "./scripts/release.rb #{config.deployment_target} #{config.short_version}.#{config.version}"
end