Skip to content

Commit

Permalink
undo fastfile changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JavonDavis committed Mar 8, 2021
1 parent 92ba7f1 commit 5bbcaf2
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ ENV["validate_translations"]="lintVanillaRelease"
#####################################################################################
desc "Creates a new release branch from the current develop"
lane :code_freeze do | options |
# gutenberg_dep_check()
old_version = 16.8

# android_bump_version_release()
new_version = 16.9
# extract_release_notes_for_version(version: new_version,
# release_notes_file_path:"#{ENV["PROJECT_ROOT_FOLDER"]}RELEASE-NOTES.txt",
# extracted_notes_file_path:release_notes_path)
# cleanup_release_files(files: [release_note_short_path])
# android_update_release_notes(new_version: new_version)
# setbranchprotection(repository:GHHELPER_REPO, branch: "release/#{new_version}")
# setfrozentag(repository:GHHELPER_REPO, milestone: new_version)
gutenberg_dep_check()
old_version = android_codefreeze_prechecks(options)

android_bump_version_release()
new_version = android_get_app_version()
extract_release_notes_for_version(version: new_version,
release_notes_file_path:"#{ENV["PROJECT_ROOT_FOLDER"]}RELEASE-NOTES.txt",
extracted_notes_file_path:release_notes_path)
cleanup_release_files(files: [release_note_short_path])
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()
Expand Down Expand Up @@ -193,7 +193,7 @@ ENV["validate_translations"]="lintVanillaRelease"
#####################################################################################
# finalize_hotfix_release
# -----------------------------------------------------------------------------------
# This lane finalizes the hotfix branch.
# This lane finalizes the hotfix branch.
# -----------------------------------------------------------------------------------
# Usage:
# bundle exec fastlane finalize_hotfix_release
Expand Down Expand Up @@ -247,7 +247,7 @@ ENV["validate_translations"]="lintVanillaRelease"
# bundle exec fastlane build_and_upload_release
# bundle exec fastlane build_and_upload_release skip_confirm:true
# bundle exec fastlane build_and_upload_release skip_prechecks:true
# bundle exec fastlane build_and_upload_release create_release:true
# bundle exec fastlane build_and_upload_release create_release:true
#####################################################################################
desc "Builds and updates for distribution"
lane :build_and_upload_release do | options |
Expand Down Expand Up @@ -279,7 +279,7 @@ ENV["validate_translations"]="lintVanillaRelease"
# Example:
# bundle exec fastlane build_and_upload_pre_releases
# bundle exec fastlane build_and_upload_pre_releases skip_confirm:true
# bundle exec fastlane build_and_upload_beta create_release:true
# bundle exec fastlane build_and_upload_beta create_release:true
#####################################################################################
desc "Builds and updates for distribution"
lane :build_and_upload_pre_releases do | options |
Expand Down Expand Up @@ -546,12 +546,12 @@ ENV["validate_translations"]="lintVanillaRelease"
Dir.chdir("..") do
sh("mkdir -p #{build_dir}")
unless is_ci
# We pre-build the Gutenberg RN bundle on a different job on CI,
# so cleaning here breaks the build
# We pre-build the Gutenberg RN bundle on a different job on CI,
# so cleaning here breaks the build
UI.message("Cleaning branch...")
sh("echo \"Cleaning branch\" >> #{logfile_path}")
sh("./gradlew clean >> #{logfile_path} 2>&1")
end
end
sh("mkdir -p #{build_dir}")
UI.message("Running lint...")
sh("echo \"Running lint...\" >> #{logfile_path}")
Expand Down Expand Up @@ -616,7 +616,7 @@ ENV["validate_translations"]="lintVanillaRelease"
lane :build_for_translation_review do | options |
cmd_params = ""
unless options[:custom_version].nil?
UI.message("Building custom version: #{options[:custom_version]}")
UI.message("Building custom version: #{options[:custom_version]}")
cmd_params=" -PversionName=\"#{options[:custom_version]}\""
end

Expand All @@ -626,7 +626,7 @@ ENV["validate_translations"]="lintVanillaRelease"

android_merge_translators_strings(strings_folder:"./WordPress/src/main/res/")
sh("export SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD=1 && cd .. && ./gradlew --stacktrace assembleJalapenoRelease #{cmd_params}")
end
end

#####################################################################################
# trigger_ci
Expand Down Expand Up @@ -688,7 +688,7 @@ ENV["validate_translations"]="lintVanillaRelease"
temp_dir = Dir.mktmpdir()

command = ""
if is_ci
if is_ci
command << "bundletool build-apks --bundle=\"#{bundle_path}\" \\
--output=\"#{temp_dir}/universal.apks\" \\
--mode=universal"
Expand Down Expand Up @@ -717,8 +717,8 @@ ENV["validate_translations"]="lintVanillaRelease"
# APKs built on CI are unsigned, so don't upload them until we have a fix
release_assets = [aab_file_path]
release_assets.append(apk_file_path) unless is_ci
create_release(repository:GHHELPER_REPO,
version: version["name"],
create_release(repository:GHHELPER_REPO,
version: version["name"],
release_notes_file_path:release_notes_path,
prerelease: set_prerelease_flag,
release_assets: release_assets.join(',')
Expand All @@ -727,7 +727,7 @@ ENV["validate_translations"]="lintVanillaRelease"

private_lane :cleanup_release_files do | options |
files = options[:files]

files.each do | f |
File.open(f, "w") {}
sh("git add #{f}")
Expand All @@ -746,7 +746,7 @@ ENV["validate_translations"]="lintVanillaRelease"
def release_note_short_path
project_root = File.dirname(File.expand_path(File.dirname(__FILE__)))
File.join(project_root, "WordPress", "metadata/release_notes_short.txt")
end
end

def universal_apk_name(version)
"wpandroid-#{version["name"]}-universal.apk"
Expand Down

0 comments on commit 5bbcaf2

Please sign in to comment.