Skip to content

Commit

Permalink
Fix RuboCop offenses after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
iangmaia committed Nov 8, 2023
1 parent 774e658 commit 72d5b30
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def self.get_release_version(build_gradle_path:, version_properties_path:, has_a
section = has_alpha_version.nil? ? 'defaultConfig' : 'vanilla {'
name = get_version_name_from_gradle_file(build_gradle_path, section)
code = get_version_build_from_gradle_file(build_gradle_path, section)
return { VERSION_NAME => name, VERSION_CODE => code }
{ VERSION_NAME => name, VERSION_CODE => code }
end

# Extract the version name and code from the `version.properties` file in the project root
Expand Down Expand Up @@ -87,7 +87,7 @@ def self.get_alpha_version(build_gradle_path:, version_properties_path:, has_alp
section = 'defaultConfig'
name = get_version_name_from_gradle_file(build_gradle_path, section)
code = get_version_build_from_gradle_file(build_gradle_path, section)
return { VERSION_NAME => name, VERSION_CODE => code }
{ VERSION_NAME => name, VERSION_CODE => code }
end

# Determines if a version name corresponds to an alpha version (starts with `"alpha-"`` prefix)
Expand Down Expand Up @@ -280,7 +280,7 @@ def self.is_hotfix?(version)
#
def self.bump_version_release(build_gradle_path:, version_properties_path:, has_alpha_version:)
# Bump release
current_version = self.get_release_version(
current_version = get_release_version(
build_gradle_path: build_gradle_path,
version_properties_path: version_properties_path,
has_alpha_version: has_alpha_version
Expand Down Expand Up @@ -312,8 +312,8 @@ def self.update_versions(new_version_beta, new_version_alpha, version_properties
end
File.write(version_properties_path, content)
else
self.update_version(new_version_beta, has_alpha_version.nil? ? 'defaultConfig' : 'vanilla {')
self.update_version(new_version_alpha, 'defaultConfig') unless new_version_alpha.nil?
update_version(new_version_beta, has_alpha_version.nil? ? 'defaultConfig' : 'vanilla {')
update_version(new_version_alpha, 'defaultConfig') unless new_version_alpha.nil?
end
end

Expand Down

0 comments on commit 72d5b30

Please sign in to comment.