From 8792f5ea3e2b1703e2d89eccb782d088738fb7b5 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Tue, 9 Jun 2020 15:43:15 -0400 Subject: [PATCH 01/14] Whitespace changes in FastFile --- fastlane/Fastfile | 92 +++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index a7135b249f9c..dc2473a61d0e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -52,7 +52,7 @@ ENV["HAS_ALPHA_VERSION"]="true" # bundle exec fastlane code_freeze [update_release_branch_version:] [skip_confirm:] # # Example: - # bundle exec fastlane code_freeze + # bundle exec fastlane code_freeze # bundle exec fastlane code_freeze update_release_branch_version:false # bundle exec fastlane code_freeze skip_confirm:true ##################################################################################### @@ -60,13 +60,13 @@ ENV["HAS_ALPHA_VERSION"]="true" lane :code_freeze do | options | gutenberg_dep_check() old_version = android_codefreeze_prechecks(options) - + android_bump_version_release() new_version = android_get_app_version() android_update_release_notes(new_version: new_version) setbranchprotection(repository:GHHELPER_REPO, branch: "release/#{new_version}") setfrozentag(repository:GHHELPER_REPO, milestone: new_version) - + localize_gutenberg(skip_module_update: true) localize_libs() ensure_git_status_clean() @@ -74,7 +74,7 @@ ENV["HAS_ALPHA_VERSION"]="true" end ##################################################################################### -# update_appstore_strings +# update_appstore_strings # ----------------------------------------------------------------------------------- # This lane gets the data from the txt files in the WordPress/metadata/ folder # and updates the .po file that is then picked by GlotPress for translations. @@ -86,7 +86,7 @@ ENV["HAS_ALPHA_VERSION"]="true" # fastlane update_appstore_strings version:10.3 ##################################################################################### desc "Updates the PlayStoreStrings.po file" - lane :update_appstore_strings do |options| + lane :update_appstore_strings do |options| prj_folder = Dir.pwd + "/.." files = { @@ -110,10 +110,10 @@ ENV["HAS_ALPHA_VERSION"]="true" enhanced_app_store_screenshot_7: prj_folder + "/WordPress/metadata/enhanced_screenshot_7.html", } - android_update_metadata_source(po_file_path: prj_folder + "/WordPress/metadata/PlayStoreStrings.po", - source_files: files, + android_update_metadata_source(po_file_path: prj_folder + "/WordPress/metadata/PlayStoreStrings.po", + source_files: files, release_version: options[:version]) - end + end ##################################################################################### # new_beta_release @@ -141,7 +141,7 @@ ENV["HAS_ALPHA_VERSION"]="true" ##################################################################################### # new_hotfix_release # ----------------------------------------------------------------------------------- - # This lane updates the release branch for a new hotix release. + # This lane updates the release branch for a new hotix release. # ----------------------------------------------------------------------------------- # Usage: # bundle exec fastlane new_hotfix_release [skip_confirm:] [version:] @@ -156,18 +156,18 @@ ENV["HAS_ALPHA_VERSION"]="true" android_bump_version_hotfix(previous_version_name: prev_ver, version_name: options[:version_name], version_code: options[:version_code]) android_tag_build(tag_alpha: false) end - + ##################################################################################### # finalize_release # ----------------------------------------------------------------------------------- # This lane finalize a release: updates store metadata and runs the release checks # ----------------------------------------------------------------------------------- # Usage: - # bundle exec fastlane finalize_release [skip_confirm:] + # bundle exec fastlane finalize_release [skip_confirm:] # # Example: - # bundle exec fastlane finalize_release - # bundle exec fastlane finalize_release skip_confirm:true + # bundle exec fastlane finalize_release + # bundle exec fastlane finalize_release skip_confirm:true ##################################################################################### desc "Updates store metadata and runs the release checks" lane :finalize_release do | options | @@ -189,23 +189,23 @@ ENV["HAS_ALPHA_VERSION"]="true" ##################################################################################### # build_release # ----------------------------------------------------------------------------------- - # This lane builds the final release of the app and uploads it + # This lane builds the final release of the app and uploads it # ----------------------------------------------------------------------------------- # Usage: # bundle exec fastlane build_release [skip_confirm:] # # Example: - # bundle exec fastlane build_release - # bundle exec fastlane build_release skip_confirm:true + # bundle exec fastlane build_release + # bundle exec fastlane build_release skip_confirm:true ##################################################################################### desc "Builds and updates for distribution" lane :build_release do | options | - android_build_prechecks(skip_confirm: options[:skip_confirm], + android_build_prechecks(skip_confirm: options[:skip_confirm], alpha: false, beta: false, final: true) android_build_preflight() - + # Create the file names version=android_get_release_version() build_bundle(version: version, flavor:"Vanilla", buildType: "release") @@ -214,18 +214,18 @@ ENV["HAS_ALPHA_VERSION"]="true" ##################################################################################### # build_pre_releases # ----------------------------------------------------------------------------------- - # This lane builds the app it for both internal and external distribution + # This lane builds the app it for both internal and external distribution # ----------------------------------------------------------------------------------- # Usage: # bundle exec fastlane build_pre_releases [skip_confirm:] # # Example: - # bundle exec fastlane build_pre_releases - # bundle exec fastlane build_pre_releases skip_confirm:true + # bundle exec fastlane build_pre_releases + # bundle exec fastlane build_pre_releases skip_confirm:true ##################################################################################### desc "Builds and updates for distribution" lane :build_pre_releases do | options | - android_build_prechecks(skip_confirm: options[:skip_confirm], + android_build_prechecks(skip_confirm: options[:skip_confirm], alpha: true, beta: true, final: false) @@ -237,14 +237,14 @@ ENV["HAS_ALPHA_VERSION"]="true" ##################################################################################### # build_alpha # ----------------------------------------------------------------------------------- - # This lane builds the app it for internal testing + # This lane builds the app it for internal testing # ----------------------------------------------------------------------------------- # Usage: # bundle exec fastlane build_alpha [skip_confirm:] # # Example: - # bundle exec fastlane build_alpha - # bundle exec fastlane build_alpha skip_confirm:true + # bundle exec fastlane build_alpha + # bundle exec fastlane build_alpha skip_confirm:true ##################################################################################### desc "Builds and updates for distribution" lane :build_alpha do | options | @@ -259,14 +259,14 @@ ENV["HAS_ALPHA_VERSION"]="true" ##################################################################################### # build_beta # ----------------------------------------------------------------------------------- - # This lane builds the app it for internal testing + # This lane builds the app it for internal testing # ----------------------------------------------------------------------------------- # Usage: # bundle exec fastlane build_beta [skip_confirm:] # # Example: - # bundle exec fastlane build_beta - # bundle exec fastlane build_beta skip_confirm:true + # bundle exec fastlane build_beta + # bundle exec fastlane build_beta skip_confirm:true ##################################################################################### desc "Builds and updates for distribution" lane :build_beta do | options | @@ -279,7 +279,7 @@ ENV["HAS_ALPHA_VERSION"]="true" end ##################################################################################### - # download_metadata_string + # download_metadata_string # ----------------------------------------------------------------------------------- # This lane downloads the translated metadata (release notes, # app store strings, title, etc.) from GlotPress and updates the local files @@ -291,7 +291,7 @@ ENV["HAS_ALPHA_VERSION"]="true" # fastlane download_metadata_string build_number:573 version:10.3 ##################################################################################### desc "Downloads translated metadata from GlotPress" - lane :download_metadata_strings do |options| + lane :download_metadata_strings do |options| values = options[:version].split('.') files = { "release_note_#{values[0]}#{values[1]}" => {desc: "changelogs/#{options[:build_number]}.txt", max_size: 0}, @@ -302,19 +302,19 @@ ENV["HAS_ALPHA_VERSION"]="true" delete_old_changelogs(build: options[:build_number]) download_path=Dir.pwd + "/metadata/android" - gp_downloadmetadata(project_url: "https://translate.wordpress.org/projects/apps/android/release-notes/", - target_files: files, + gp_downloadmetadata(project_url: "https://translate.wordpress.org/projects/apps/android/release-notes/", + target_files: files, locales: SUPPORTED_LOCALES.map {| hsh | [ hsh[:glotpress], hsh[:google_play] ]}, source_locale: "en-US", download_path: download_path) - + android_create_xml_release_notes(download_path: download_path, build_number: "#{options[:build_number]}", locales: SUPPORTED_LOCALES.map {| hsh | [ hsh[:glotpress], hsh[:google_play] ]}) sh("git add #{download_path} && git commit -m \"Update metadata translations for #{options[:version]}\" && git push origin HEAD") - end + end ######################################################################## # Dependencies handling lanes -######################################################################## +######################################################################## main_strings_path = "./WordPress/src/main/res/values/strings.xml" libraries_strings_path = [ {library: "Login Library", strings_path: "./libs/login/WordPressLoginFlow/src/main/res/values/strings.xml", exclusions: ["default_web_client_id"]}, @@ -325,14 +325,14 @@ ENV["HAS_ALPHA_VERSION"]="true" if (options[:auto_commit]) then sh("cd .. && git add #{main_strings_path}") sh("git commit -m 'Update strings for translation'") - sh("git push origin HEAD") + sh("git push origin HEAD") else UI.important("Your #{main_strings_path} has changed.") UI.input("Please, review the changes, commit them and press return to continue.") end end - + desc "Merge libraries strings files into the main app one" lane :localize_libs do | options | if (an_localize_libs(app_strings_path: main_strings_path, libs_strings_path: libraries_strings_path)) then @@ -348,7 +348,7 @@ ENV["HAS_ALPHA_VERSION"]="true" end sh("cd .. && python ./tools/merge_strings_xml.py") - + is_repo_clean = ("git status --porcelain").empty? unless is_repo_clean then commit_strings(options) @@ -364,12 +364,12 @@ ENV["HAS_ALPHA_VERSION"]="true" diff_url = "https://patch-diff.githubusercontent.com/raw/wordpress-mobile/WordPress-Android/pull/#{pr_number}.diff" end - an_validate_lib_strings(app_strings_path: main_strings_path, libs_strings_path: libraries_strings_path, diff_url: diff_url) - end + an_validate_lib_strings(app_strings_path: main_strings_path, libs_strings_path: libraries_strings_path, diff_url: diff_url) + end ######################################################################## # Helper Lanes -######################################################################## +######################################################################## desc "Get a list of pull request from `start_tag` to the current state" lane :get_pullrequests_list do | options | get_prs_list(repository:GHHELPER_REPO, start_tag:"#{options[:start_tag]}", report_path:"#{File.expand_path('~')}/wpandroid_prs_list.txt") @@ -422,7 +422,7 @@ ENV["HAS_ALPHA_VERSION"]="true" ##################################################################################### # gutenberg_dep_check # ----------------------------------------------------------------------------------- - # Verifies that Gutenberg is on the last released version + # Verifies that Gutenberg is on the last released version # ----------------------------------------------------------------------------------- # Usage: # bundle exec fastlane gutenberg_dep_check @@ -442,13 +442,13 @@ ENV["HAS_ALPHA_VERSION"]="true" if (last_tag_hash != submodule_hash) error_message = "Gutenberg submodule hash is not on the last tag!\nSubmodule hash: #{submodule_hash}\nLast tag hash: #{last_tag_hash}" - UI.user_error!(error_message) unless UI.interactive? - + UI.user_error!(error_message) unless UI.interactive? + if (!UI.confirm("#{error_message}\nDo you want to continue anyway?")) UI.user_error!("Aborted by user request. Please fix Gutenberg reference and try again.") end else - UI.message("Gutenberg is on the last tag: #{last_tag_hash}.") + UI.message("Gutenberg is on the last tag: #{last_tag_hash}.") end end end @@ -480,7 +480,7 @@ ENV["HAS_ALPHA_VERSION"]="true" sh(command) sh("unzip \"#{temp_dir}/universal.apks\" -d \"#{temp_dir}\"") - FileUtils.cp_r("#{temp_dir}/universal.apk", "#{apk_path}", remove_destination: true) + FileUtils.cp_r("#{temp_dir}/universal.apk", "#{apk_path}", remove_destination: true) FileUtils.rm_rf("#{temp_dir}") end end From 368dee5936cf47afd2413a360ae57bd1b02e3986 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Fri, 12 Jun 2020 16:09:07 -0400 Subject: [PATCH 02/14] Update .configure to copy google-upload-credentials.json --- .configure | 9 +++++++-- .gitignore | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.configure b/.configure index a0781f31f527..75a04621ff76 100644 --- a/.configure +++ b/.configure @@ -1,7 +1,7 @@ { "project_name": "WordPress-Android", "branch": "master", - "pinned_hash": "62249ca6e914a98dcee0bb715fab1d24053ce65b", + "pinned_hash": "dfad4fad4b10b878f23d86276af89b48d223bbc4", "files_to_copy": [ { "file": "android/WPAndroid/gradle.properties", @@ -27,9 +27,14 @@ "file": "android/automattic.jks", "destination": "WordPress/release.jks", "encrypt": false + }, + { + "file": "android/WPAndroid/google-upload-credentials.json", + "destination": "google-upload-credentials.json", + "encrypt": true } ], "file_dependencies": [ ] -} \ No newline at end of file +} diff --git a/.gitignore b/.gitignore index bcf1c94c7f3b..55973889ee2f 100644 --- a/.gitignore +++ b/.gitignore @@ -70,7 +70,7 @@ WordPress/src/main/res/values/com_crashlytics_export_strings.xml # Google services configuration google-services.json -# Fastlane +# Fastlane fastlane/.env* fastlane/report.xml fastlane/README.md @@ -78,6 +78,7 @@ fastlane/metadata/android/screenshots.html fastlane/metadata/android/*/images/ fastlane/screenshots_orig default.profraw +google-upload-credentials.json # Bundler /.bundle From 62e86cba48377b7ed3043a9793bc5d61d578a275 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Fri, 12 Jun 2020 16:26:55 -0400 Subject: [PATCH 03/14] Adds automated play store uploads to Fastlane --- fastlane/Fastfile | 61 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index dc2473a61d0e..fb618c118bad 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -199,7 +199,7 @@ ENV["HAS_ALPHA_VERSION"]="true" # bundle exec fastlane build_release skip_confirm:true ##################################################################################### desc "Builds and updates for distribution" - lane :build_release do | options | + lane :build_and_upload_release do | options | android_build_prechecks(skip_confirm: options[:skip_confirm], alpha: false, beta: false, @@ -209,12 +209,14 @@ ENV["HAS_ALPHA_VERSION"]="true" # Create the file names version=android_get_release_version() build_bundle(version: version, flavor:"Vanilla", buildType: "release") + + upload_build_to_play_store(version: version, track: "production") end ##################################################################################### # build_pre_releases # ----------------------------------------------------------------------------------- - # This lane builds the app it for both internal and external distribution + # This lane builds the app it for both internal and external distribution and uploads them # ----------------------------------------------------------------------------------- # Usage: # bundle exec fastlane build_pre_releases [skip_confirm:] @@ -230,21 +232,21 @@ ENV["HAS_ALPHA_VERSION"]="true" beta: true, final: false) android_build_preflight() - build_alpha(skip_prechecks: true, skip_confirm: options[:skip_confirm]) - build_beta(skip_prechecks: true, skip_confirm: options[:skip_confirm]) + build_alpha(skip_prechecks: true, skip_confirm: options[:skip_confirm], upload_to_play_store: true) + build_beta(skip_prechecks: true, skip_confirm: options[:skip_confirm], upload_to_play_store: true) end ##################################################################################### # build_alpha # ----------------------------------------------------------------------------------- - # This lane builds the app it for internal testing + # This lane builds the app it for internal testing and optionally uploads it # ----------------------------------------------------------------------------------- # Usage: - # bundle exec fastlane build_alpha [skip_confirm:] + # bundle exec fastlane build_alpha [skip_confirm: upload_to_play_store:] # # Example: # bundle exec fastlane build_alpha - # bundle exec fastlane build_alpha skip_confirm:true + # bundle exec fastlane build_alpha skip_confirm:true upload_to_play_store:true ##################################################################################### desc "Builds and updates for distribution" lane :build_alpha do | options | @@ -254,19 +256,23 @@ ENV["HAS_ALPHA_VERSION"]="true" # Create the file names version=android_get_alpha_version() build_bundle(version: version, flavor:"Zalpha", buildType: "release") + + if (options[:upload_to_play_store]) then + upload_build_to_play_store(version: version, track: "alpha") + end end ##################################################################################### # build_beta # ----------------------------------------------------------------------------------- - # This lane builds the app it for internal testing + # This lane builds the app it for internal testing and optionally uploads it # ----------------------------------------------------------------------------------- # Usage: - # bundle exec fastlane build_beta [skip_confirm:] + # bundle exec fastlane build_beta [skip_confirm: upload_to_play_store:] # # Example: # bundle exec fastlane build_beta - # bundle exec fastlane build_beta skip_confirm:true + # bundle exec fastlane build_beta skip_confirm:true upload_to_play_store:true ##################################################################################### desc "Builds and updates for distribution" lane :build_beta do | options | @@ -276,6 +282,41 @@ ENV["HAS_ALPHA_VERSION"]="true" # Create the file names version=android_get_release_version() build_bundle(version: version, flavor:"Vanilla", buildType: "release") + + if (options[:upload_to_play_store]) then + upload_build_to_play_store(version: version, track: "beta") + end + end + + ##################################################################################### + # upload_build_to_play_store + # ----------------------------------------------------------------------------------- + # This lane uploads the build for a given version to the given track + # ----------------------------------------------------------------------------------- + # Usage: + # bundle exec fastlane upload_build_to_play_store version: track: + # + # Example: + # bundle exec fastlane upload_build_to_play_store version:15.0 track:production + # bundle exec fastlane upload_build_to_play_store version:alpha-228 track:alpha + # bundle exec fastlane upload_build_to_play_store version:15.0-rc-1 track:beta + ##################################################################################### + desc "Upload Build to Play Store" + lane :upload_build_to_play_store do | options | + project_root = File.dirname(File.expand_path(File.dirname(__FILE__))) + aab_file_path = File.join(project_root, "build", "wpandroid-#{ options[:version]["name"] }.aab") + UI.error("Unable to find a build artifact at #{aab_file_path}") unless File.exist? aab_file_path + upload_to_play_store( + package_name: 'org.wordpress.android', + aab: aab_file_path, + track: options[:upload_track], + release_status: 'draft', + skip_upload_metadata: true, + skip_upload_changelogs: true, + skip_upload_images: true, + skip_upload_screenshots: true, + json_key: './google-upload-credentials.json', + ) end ##################################################################################### From 2a6c319605366bbbb62402020df0665468a0f938 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Fri, 12 Jun 2020 18:10:01 -0400 Subject: [PATCH 04/14] Fixes upload_build_to_play_store lane to use version directly --- fastlane/Fastfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index fb618c118bad..36e0133ab974 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -210,7 +210,7 @@ ENV["HAS_ALPHA_VERSION"]="true" version=android_get_release_version() build_bundle(version: version, flavor:"Vanilla", buildType: "release") - upload_build_to_play_store(version: version, track: "production") + upload_build_to_play_store(version: version["name"], track: "production") end ##################################################################################### @@ -258,7 +258,7 @@ ENV["HAS_ALPHA_VERSION"]="true" build_bundle(version: version, flavor:"Zalpha", buildType: "release") if (options[:upload_to_play_store]) then - upload_build_to_play_store(version: version, track: "alpha") + upload_build_to_play_store(version: version["name"], track: "alpha") end end @@ -284,7 +284,7 @@ ENV["HAS_ALPHA_VERSION"]="true" build_bundle(version: version, flavor:"Vanilla", buildType: "release") if (options[:upload_to_play_store]) then - upload_build_to_play_store(version: version, track: "beta") + upload_build_to_play_store(version: version["name"], track: "beta") end end @@ -304,7 +304,7 @@ ENV["HAS_ALPHA_VERSION"]="true" desc "Upload Build to Play Store" lane :upload_build_to_play_store do | options | project_root = File.dirname(File.expand_path(File.dirname(__FILE__))) - aab_file_path = File.join(project_root, "build", "wpandroid-#{ options[:version]["name"] }.aab") + aab_file_path = File.join(project_root, "build", "wpandroid-#{ options[:version] }.aab") UI.error("Unable to find a build artifact at #{aab_file_path}") unless File.exist? aab_file_path upload_to_play_store( package_name: 'org.wordpress.android', From 9fb9e07516df0b25bca35ed9e7a6176c4cd31c8c Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Tue, 16 Jun 2020 16:20:27 -0400 Subject: [PATCH 05/14] Update FluxC version to 1.6.14.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 209721da04d2..6df4d73b7add 100644 --- a/build.gradle +++ b/build.gradle @@ -124,7 +124,7 @@ ext { androidxWorkVersion = "2.0.1" daggerVersion = '2.22.1' - fluxCVersion = '1.6.14' + fluxCVersion = '1.6.14.1' appCompatVersion = '1.0.2' constraintLayoutVersion = '1.1.3' From 3590b40b7dd6cea3cd54ed4902febaefb96114c5 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 17 Jun 2020 22:04:58 -0400 Subject: [PATCH 06/14] Fixes the track option for uploading builds --- fastlane/Fastfile | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d1c056ab9f79..fb93c49d9a85 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -291,7 +291,7 @@ ENV["HAS_ALPHA_VERSION"]="true" ##################################################################################### # upload_build_to_play_store # ----------------------------------------------------------------------------------- - # This lane uploads the build for a given version to the given track + # This lane uploads the build to Play Store for the given version to the given track # ----------------------------------------------------------------------------------- # Usage: # bundle exec fastlane upload_build_to_play_store version: track: @@ -305,18 +305,21 @@ ENV["HAS_ALPHA_VERSION"]="true" lane :upload_build_to_play_store do | options | project_root = File.dirname(File.expand_path(File.dirname(__FILE__))) aab_file_path = File.join(project_root, "build", "wpandroid-#{ options[:version] }.aab") - UI.error("Unable to find a build artifact at #{aab_file_path}") unless File.exist? aab_file_path - upload_to_play_store( - package_name: 'org.wordpress.android', - aab: aab_file_path, - track: options[:upload_track], - release_status: 'draft', - skip_upload_metadata: true, - skip_upload_changelogs: true, - skip_upload_images: true, - skip_upload_screenshots: true, - json_key: './google-upload-credentials.json', - ) + if File.exists? aab_file_path then + upload_to_play_store( + package_name: 'org.wordpress.android', + aab: aab_file_path, + track: options[:track], + release_status: 'draft', + skip_upload_metadata: true, + skip_upload_changelogs: true, + skip_upload_images: true, + skip_upload_screenshots: true, + json_key: './google-upload-credentials.json', + ) + else + UI.error("Unable to find a build artifact at #{aab_file_path}") + end end ##################################################################################### From 6d8c8e6f2668fa48360845fd2f2c11a9d452f5d7 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 17 Jun 2020 22:09:19 -0400 Subject: [PATCH 07/14] Update release notes for 15.1 after editorial --- WordPress/metadata/release_notes.txt | 7 +++---- WordPress/metadata/release_notes_short.txt | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/WordPress/metadata/release_notes.txt b/WordPress/metadata/release_notes.txt index 6cb321b11b78..11474cec8db2 100644 --- a/WordPress/metadata/release_notes.txt +++ b/WordPress/metadata/release_notes.txt @@ -1,4 +1,3 @@ -Block editor additions: New Verse block. Support for overlay colors in Cover block. Enter/exit animation for the Floating Toolbar. Tooltip for page template selection buttons. -Block editor updates: “Trash block” in a menu reachable from the block toolbar. -Block editor fixes: Text block merging issue, button alignment in page templates, string inconsistencies. -Other updates: Added homepage settings to pages list and to site settings. Improved Reader UI. +Block editor improvements: Scheduling, tag, and visibility settings pop up in the post editor and post list when you tap Publish — tweak them and tap “Publish Now” to complete publication. Pressing enter after adding a caption in Image, Video, Gallery, Quote, and Pullquote blocks automatically adds a new block. + +Fixes: Video thumbnails, settings, and preview display properly in the Media section on private sites. Notifications and Install Jetpack tabs no longer display on top of one another. diff --git a/WordPress/metadata/release_notes_short.txt b/WordPress/metadata/release_notes_short.txt index 52d6729ec466..b5472bb46454 100644 --- a/WordPress/metadata/release_notes_short.txt +++ b/WordPress/metadata/release_notes_short.txt @@ -1,3 +1,3 @@ -Block editor additions: New Verse block. Support for overlay colors in Cover block. Enter/exit animation for Floating Toolbar. Tooltip for page template selection buttons. -Block editor updates: “Trash block” in a menu reachable from the block toolbar. -Other updates: Added homepage settings to pages list and to site settings. +Improvements: Scheduling, tag, and visibility panel pops up in editor and post list pre-publication. Pressing enter after adding captions in Image, Video, Gallery, Quote, and Pullquote blocks adds a new block. + +Fixes: Video thumbnails, settings, and preview display properly on private sites. Notifications and Install Jetpack tabs no longer overlay. From cf19d4b7f2e34388ca42effedc7a04124ab8171e Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 17 Jun 2020 22:09:45 -0400 Subject: [PATCH 08/14] Update metadata strings --- WordPress/metadata/PlayStoreStrings.po | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/WordPress/metadata/PlayStoreStrings.po b/WordPress/metadata/PlayStoreStrings.po index 27e8980f3169..6294e61390fa 100644 --- a/WordPress/metadata/PlayStoreStrings.po +++ b/WordPress/metadata/PlayStoreStrings.po @@ -11,6 +11,14 @@ msgstr "" "Project-Id-Version: Release Notes & Play Store Descriptions\n" #. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas! +msgctxt "release_note_151" +msgid "" +"15.1:\n" +"Block editor improvements: Scheduling, tag, and visibility settings pop up in the post editor and post list when you tap Publish — tweak them and tap “Publish Now” to complete publication. Pressing enter after adding a caption in Image, Video, Gallery, Quote, and Pullquote blocks automatically adds a new block.\n" +"\n" +"Fixes: Video thumbnails, settings, and preview display properly in the Media section on private sites. Notifications and Install Jetpack tabs no longer display on top of one another.\n" +msgstr "" + msgctxt "release_note_150" msgid "" "15.0:\n" @@ -20,15 +28,15 @@ msgid "" "Other updates: Added homepage settings to pages list and to site settings. Improved Reader UI.\n" msgstr "" -msgctxt "release_note_149" +#. translators: A shorter version of the Release notes to be displayed in the Play Store. Limit to 500 characters including spaces and commas! +msgctxt "release_note_short_151" msgid "" -"14.9:\n" -"Block editor enhancements: New Pullquote block, Button block color options, updated page templates.\n" +"15.1:\n" +"Improvements: Scheduling, tag, and visibility panel pops up in editor and post list pre-publication. Pressing enter after adding captions in Image, Video, Gallery, Quote, and Pullquote blocks adds a new block.\n" "\n" -"Block editor fixes: Free Photo Library bug that inserted single images even if several were selected, preview failure when switching to the classic editor. Removed non-functional Subscription Button from Blog template.\n" +"Fixes: Video thumbnails, settings, and preview display properly on private sites. Notifications and Install Jetpack tabs no longer overlay.\n" msgstr "" -#. translators: A shorter version of the Release notes to be displayed in the Play Store. Limit to 500 characters including spaces and commas! msgctxt "release_note_short_150" msgid "" "15.0:\n" @@ -37,12 +45,6 @@ msgid "" "Other updates: Added homepage settings to pages list and to site settings.\n" msgstr "" -msgctxt "release_note_short_149" -msgid "" -"14.9:\n" -"Block editor enhancements: New Pullquote block, Button block color options, updated page templates.\n" -msgstr "" - #. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas! msgctxt "sample_post_content" msgid "The best moment of any trip, for me, is when I first step foot off the plane. The whole of the trip is in front me, ripe with possibility." From ebc6fe844924f6f0bac48227aa72b8d5bbb0c21c Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 17 Jun 2020 22:11:14 -0400 Subject: [PATCH 09/14] Bump version number --- WordPress/build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WordPress/build.gradle b/WordPress/build.gradle index faca61addfe9..96677bdab019 100644 --- a/WordPress/build.gradle +++ b/WordPress/build.gradle @@ -55,9 +55,9 @@ android { if (project.hasProperty("versionName")) { versionName project.property("versionName") } else { - versionName "alpha-229" + versionName "alpha-230" } - versionCode 882 + versionCode 884 minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion @@ -85,9 +85,9 @@ android { dimension "buildType" // Only set the release version if one isn't provided if (!project.hasProperty("versionName")) { - versionName "15.1-rc-1" + versionName "15.1-rc-2" } - versionCode 881 + versionCode 883 buildConfigField "boolean", "ME_ACTIVITY_AVAILABLE", "false" buildConfigField "boolean", "TENOR_AVAILABLE", "false" buildConfigField "boolean", "READER_IMPROVEMENTS_PHASE_2", "false" From 28a4852ed9c2f57c28e2f4df1e682a75a4d7dc83 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 17 Jun 2020 22:17:51 -0400 Subject: [PATCH 10/14] build_pre_releases lane renamed as build_and_upload_pre_releases --- fastlane/Fastfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index fb93c49d9a85..dd82734aeda7 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -214,19 +214,19 @@ ENV["HAS_ALPHA_VERSION"]="true" end ##################################################################################### - # build_pre_releases + # build_and_upload_pre_releases # ----------------------------------------------------------------------------------- # This lane builds the app it for both internal and external distribution and uploads them # ----------------------------------------------------------------------------------- # Usage: - # bundle exec fastlane build_pre_releases [skip_confirm:] + # bundle exec fastlane build_and_upload_pre_releases [skip_confirm:] # # Example: - # bundle exec fastlane build_pre_releases - # bundle exec fastlane build_pre_releases skip_confirm:true + # bundle exec fastlane build_and_upload_pre_releases + # bundle exec fastlane build_and_upload_pre_releases skip_confirm:true ##################################################################################### desc "Builds and updates for distribution" - lane :build_pre_releases do | options | + lane :build_and_upload_pre_releases do | options | android_build_prechecks(skip_confirm: options[:skip_confirm], alpha: true, beta: true, From f2795a2c54001e2b6bcf9ce211cc603bb0e35639 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 17 Jun 2020 22:38:48 -0400 Subject: [PATCH 11/14] Update .configure with the latest hash --- .configure | 4 ++-- .../google-upload-credentials.json.enc | Bin 0 -> 2368 bytes 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .configure-files/google-upload-credentials.json.enc diff --git a/.configure b/.configure index 75a04621ff76..a5ae25087593 100644 --- a/.configure +++ b/.configure @@ -1,7 +1,7 @@ { "project_name": "WordPress-Android", "branch": "master", - "pinned_hash": "dfad4fad4b10b878f23d86276af89b48d223bbc4", + "pinned_hash": "e0baad79188676d7447d5b8eca1cb27dd949bf4a", "files_to_copy": [ { "file": "android/WPAndroid/gradle.properties", @@ -37,4 +37,4 @@ "file_dependencies": [ ] -} +} \ No newline at end of file diff --git a/.configure-files/google-upload-credentials.json.enc b/.configure-files/google-upload-credentials.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..0cfcc89723728ae3bf3db00583a817e5753a47d4 GIT binary patch literal 2368 zcmV-G3BUHpuDz3JMJ0ysR)T73sxGG|s*YI?P%bF&QJDA@PY39XxleizqcOcqm8|wz z`mu60)|GAfKfBc9+Ern+d8iVA8h63PIAb){GtIvSn0RO)RUlI_xtD)4{t6T3pugIh zd<7EszFkAAm)Ihm5#OydoI%_haGza=lAso+it&)ggoQ$$I-mGq;h^_pK`c&$NqJ2a<4=|w+1de)%5}j%PtSg6 z>e|*akuZzM;$Ye;W##Ny%RkRngU|`)mu8^rTyYKs;fcbF2$q{Z=#z2+xkDhp$|URk zcdOE91HFxqX8?>^u$q|3fSJ;g$(WIoYg!|Be1Y+7UjTb7$!gXQlMX`l1Q%*e3V6W0}jyo@7zbzht# zmQ~Z|kh8s&Di}%SlZw*oOU| z`18pi8Kex~h;^hl7&Dc(WYSY!1>XG$%5y2x(xj0065%c7h{IDF8oFD6k^EcXPPlIC zM;@K&e+6-c45PTlXuBluV(2*~fp9RIMUL3i$%ddy;x0Upz-0*E)&x}E`4R_Qqm3)m0CjznY@Lu}_Z$=$pT3NV6N zr+EM6ge033kYg}wjKCqxyjM9+1Pg8*j2qDO+hw6d!u(HXn?tcRnoa&M5$6#uChcIx znGEDTqxRi3@=;K{oxWU8qqi$ptj&N*z&?k}U$53t-_yf?Qb?BO4+-dA#Os*7D+ zbiB5?mM!fz3;>9B)1z8Yn4YXbjCX9u|KPK?bt2VA5lB~O&&Htbho5~&4HldAGQL;# zah9#DmY{w7Lf~NS5D4Z6l9CdPsQ>cgk#Q(AV6SAvxaJ1&@!NVEWtFMI zmVQ~r3fGn_WG=fCaR_jAF=0W*>PfxOjKPeDq^pJ1lImau#CDg8pf*BL^af&_4_T0UVm_;H}_4Bv8aK!dsza#TK`KowHcqM&c&+wY;+sv1B)I z`XTLV;Lw*rtl>=$@sHpAg@K1UFojpQsCjsKGw|T=l5%HBmnubkvK%0R{VU)Aw5RLjumEwWvz+$7dw2^dtW=cI!M0Xe$dq6HqZe}Y#h zsotC<9#!{S$5+xxnm>Nei_(X}ZL$erQ*AP4eDmHjhqPv+af}fD`fkPsX=J} z7LA{Y>i?{di$VZHNIklZZ3D8pI0egUcrpAfR-H{>8l?Y%7> zQXpSVzCHl6m+=JnL+Ej51zN_MVDIz}lQAd9CPcF1M3jcT0cHz{o}l6$W@%nvNgpDr z^%;6P8?G`{HKH&d8bq>FR21h5dXy3DPAlFY66xY4thkj{(w+%{541&>4-!jMsSB4i5 zWszg#p6tDN2~vgkAA#?Cm)8?ht=gD=vzB4Q%&>eQORj~8)f4W^rO?2k??UF6AbIpM zFY{Px|Enc`ud+2*iJ_^Z7sr%JcI|Rok;imTmeQzy`}TjOEdL782O{-QuN}~sHNOiu zdk=gWiVWu26I*L!Ma%A98tzauX|;aO>2{Xg5^Bjn`in-t=Yii{LVP@A^TE|Ax30VZ zig@00Ht1U~W>pHhe~wEC&w$lVlb3OXhRy#zD%t7q`0YoH@fQU}`exSj&L^sz@~s&~ m0ISJzD?IWU@8VwbKGk;Ll||2dKt+H%(|{U^2y7fG4!cQUh^8w5 literal 0 HcmV?d00001 From 54301e3851579324949a4a8785c11476a293492c Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 17 Jun 2020 23:09:58 -0400 Subject: [PATCH 12/14] Fix build_alpha & build_beta example comments --- fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index dd82734aeda7..48c1020af9e8 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -242,7 +242,7 @@ ENV["HAS_ALPHA_VERSION"]="true" # This lane builds the app it for internal testing and optionally uploads it # ----------------------------------------------------------------------------------- # Usage: - # bundle exec fastlane build_alpha [skip_confirm: upload_to_play_store:] + # bundle exec fastlane build_alpha [skip_confirm:] [upload_to_play_store:] # # Example: # bundle exec fastlane build_alpha @@ -268,7 +268,7 @@ ENV["HAS_ALPHA_VERSION"]="true" # This lane builds the app it for internal testing and optionally uploads it # ----------------------------------------------------------------------------------- # Usage: - # bundle exec fastlane build_beta [skip_confirm: upload_to_play_store:] + # bundle exec fastlane build_beta [skip_confirm:] [upload_to_play_store:] # # Example: # bundle exec fastlane build_beta From e28541e471a46d19d1c40149b5805109766bd44c Mon Sep 17 00:00:00 2001 From: Annmarie Ziegler Date: Thu, 18 Jun 2020 11:12:27 -0400 Subject: [PATCH 13/14] Fix NPE change && to || --- .../wordpress/android/ui/comments/CommentDetailFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/comments/CommentDetailFragment.java b/WordPress/src/main/java/org/wordpress/android/ui/comments/CommentDetailFragment.java index b0f54e25b956..c8f94eb36ab8 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/comments/CommentDetailFragment.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/comments/CommentDetailFragment.java @@ -1401,7 +1401,7 @@ private void showMoreMenu(View view) { } private void trashComment() { - if (!isAdded() && mComment == null) { + if (!isAdded() || mComment == null) { return; } From c00d840467f252fac38ab67abf4d30eefd8526d4 Mon Sep 17 00:00:00 2001 From: Joel Dean Date: Thu, 18 Jun 2020 16:27:26 -0500 Subject: [PATCH 14/14] Fixed issue where rotating device would cause new tags not to persist. --- .../wordpress/android/ui/posts/PrepublishingTagsViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingTagsViewModel.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingTagsViewModel.kt index 3a36505d11a0..adf3f94a28dc 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingTagsViewModel.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingTagsViewModel.kt @@ -39,10 +39,11 @@ class PrepublishingTagsViewModel @Inject constructor( val toolbarTitleUiState: LiveData = _toolbarTitleUiState fun start(editPostRepository: EditPostRepository) { + this.editPostRepository = editPostRepository + if (isStarted) return isStarted = true - this.editPostRepository = editPostRepository setToolbarTitleUiState() }