-
Notifications
You must be signed in to change notification settings - Fork 5.6k
/
frameit.rb
34 lines (28 loc) 路 931 Bytes
/
frameit.rb
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
module Fastlane
module Actions
class FrameitAction < Action
def self.run(params)
return if Helper.test?
require 'frameit'
begin
FastlaneCore::UpdateChecker.start_looking_for_update('frameit')
color = Frameit::Editor::Color::BLACK
color = Frameit::Editor::Color::SILVER if [:silver, :white].include?(params.first)
screenshots_folder = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
screenshots_folder ||= FastlaneFolder.path
Dir.chdir(screenshots_folder) do
Frameit::Editor.new.run('.', color)
end
ensure
FastlaneCore::UpdateChecker.show_update_status('frameit', Frameit::VERSION)
end
end
def self.description
"Adds device frames around the screenshots using frameit"
end
def self.author
"KrauseFx"
end
end
end
end