Skip to content

Commit

Permalink
add plist update function
Browse files Browse the repository at this point in the history
  • Loading branch information
kshann committed Jan 14, 2025
1 parent 853c58f commit 545941b
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def self.prepare_release_branch(platform, version, other_action)
update_embedded_files(platform, other_action)
if platform == "ios"
update_version_and_build_number_config(new_version, 0, other_action)
update_root_plist_version(new_version, other_action)
else
update_version_config(new_version, other_action)
end
Expand Down Expand Up @@ -364,6 +365,19 @@ def self.update_version_and_build_number_config(version, build_number, other_act
)
end

def self.update_root_plist_version(version, other_action)
plist_path = File.expand_path("../DuckDuckGo/Settings.bundle/Root.plist", __dir__)

sh("/usr/libexec/PlistBuddy", "-c", "Set :PreferenceSpecifiers:0:DefaultValue #{version}", plist_path)

other_action.git_commit(
path: [plist_path],
message: "Update Root.plist version to #{version}"
)

UI.message("Updated Root.plist version to #{version}")
end

def self.process_erb_template(erb_file_path, args)
template_content = load_file(erb_file_path)
unless template_content
Expand Down

0 comments on commit 545941b

Please sign in to comment.