Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow force set version_code if specified #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ def self.run(params)
version_code = "0"
new_version_code ||= params[:version_code]

# If version_code is set, ignore the process
if new_version_code != nil
# Store the version name in the shared hash
Actions.lane_context["VERSION_CODE"]=new_version_code.to_i
UI.success("VERSION_CODE will be forced set to #{new_version_code}")
UI.success("☝️ Version code has been changed to #{new_version_code}")

constant_name ||= params[:ext_constant_name]

gradle_file_path ||= params[:gradle_file_path]
Expand Down Expand Up @@ -102,7 +109,7 @@ def self.available_options
default_value: nil),
FastlaneCore::ConfigItem.new(key: :version_code,
env_name: "INCREMENTVERSIONCODE_VERSION_CODE",
description: "Change to a specific version (optional)",
description: "Force change to a specific version (optional)",
optional: true,
type: Integer,
default_value: 0),
Expand Down