forked from fastlane/fastlane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
60 lines (50 loc) · 1.66 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
GEMS = %w(fastlane fastlane_core deliver snapshot frameit pem sigh produce cert gym pilot credentials_manager spaceship scan supply watchbuild match screengrab)
RAILS = %w(boarding refresher enhancer)
SECONDS_PER_DAY = 60 * 60 * 24
#####################################################
# @!group Everything to be executed in the root folder containing all fastlane repos
#####################################################
desc 'Setup the fastlane development environment'
task :bootstrap do
system('gem install bundler') unless system('which bundle')
Rake::Task[:clone].invoke
Rake::Task[:install].invoke
box 'You are up and running'
end
desc 'Run `bundle update` for all the gems.'
task :bundle do
GEMS.each do |repo|
sh "cd #{repo} && bundle update"
end
end
desc 'Run `bundle update` and `rake install` for all the gems.'
task install: :bundle do
GEMS.each do |repo|
sh "cd #{repo} && rake install"
end
end
task :rubygems_admins do
names = ["KrauseFx", "ohayon", "samrobbins", "hemal", "asfalcone", "mpirri", "mfurtak", "i2amsam"]
GEMS.each do |gem_name|
names.each do |name|
puts `gem owner #{gem_name} -a #{name}`
end
end
end
desc 'show repos with checked-out feature-branches'
task :features do
(['.'] + GEMS + RAILS).each do |repo|
branch = `cd #{repo} && git symbolic-ref HEAD 2>/dev/null | awk -F/ {'print $NF'}`
puts "#{repo}\n -> #{branch}" unless branch.include?('master')
end
end
#####################################################
# @!group Helper Methods
#####################################################
def box(str)
l = str.length + 4
puts ''
puts '=' * l
puts '| ' + str + ' |'
puts '=' * l
end