Skip to content

Commit

Permalink
[deliver] set type of auto release date to integer (#16767)
Browse files Browse the repository at this point in the history
* [deliver] set type of auto release date to integer

* Add validation to make sure auto_release_date is greater than now in ms
  • Loading branch information
Josh Holtz committed Jul 7, 2020
1 parent 3f134ee commit 12ef145
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deliver/lib/deliver/options.rb
Expand Up @@ -165,11 +165,17 @@ def self.available_options
FastlaneCore::ConfigItem.new(key: :auto_release_date,
env_name: "DELIVER_AUTO_RELEASE_DATE",
description: "Date in milliseconds for automatically releasing on pending approval (Can not be used together with `automatic_release`)",
is_string: false,
type: Integer,
optional: true,
conflicting_options: [:automatic_release],
conflict_block: proc do |value|
UI.user_error!("You can't use 'auto_release_date' and '#{value.key}' options together.")
end,
verify_block: proc do |value|
now_in_ms = Time.now.to_i * 1000
if value < now_in_ms
UI.user_error!("'#{value}' needs to be in the future and in milliseonds (current time is '#{now_in_ms}')")
end
end),
FastlaneCore::ConfigItem.new(key: :phased_release,
env_name: "DELIVER_PHASED_RELEASE",
Expand Down

0 comments on commit 12ef145

Please sign in to comment.