Skip to content

Commit

Permalink
chore:f astlane
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Oct 23, 2024
1 parent b3581f2 commit 149e346
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ app_name = i18nEnJSON['app']['name']
app_resources_path = ENV["APP_RESOURCES"] || "App_Resources" # based on nativescript.config.js !!!
app_build_path = ENV["APP_BUILD_PATH"] || "platforms" # based on nativescript.config.js !!!
metadata_path = ENV["SUPPLY_METADATA_PATH"] || "metadata"
metadata_languages = ENV["SUPPLY_METADATA_LANGUAGES"] || ["en-US", "fr-FR"]
metadata_path_realpath = File.join(project_root_path, 'fastlane', metadata_path)

tag_prefix = ENV["TAG_PREFIX"] || ""
Expand Down Expand Up @@ -510,12 +511,20 @@ platform :android do
puts "current dir: #{Dir.getwd}"
puts "metadata_dir: #{metadata_dir}"
system 'mkdir', '-p', metadata_dir
files = [File.join(metadata_dir, "fr-FR/changelogs/#{version}.txt"), File.join(metadata_dir, "en-US/changelogs/#{version}.txt")]
writeFileIfNotExist(files[0], changelog)
writeFileIfNotExist(files[1], changelog)
files = []
metadata_languages.each { |lang|
changelogFolderPath = File.join(metadata_dir, lang, "changelogs")
if (Dir.exist?(changelogFolderPath))
changelogFilePath = File.join(changelogFolderPath, lang, "#{version}.txt")
writeFileIfNotExist(changelogFilePath, changelog)
files.push(changelogFilePath)
end
}
# Create a new branch and upload a PR for it.
git_add(path: files)
git_commit(path: files, message: "#{version} release notes", allow_nothing_to_commit: true)
if (files.length > 0)
git_add(path: files)
git_commit(path: files, message: "#{version} release notes", allow_nothing_to_commit: true)
end
# sh("git add #{metadata_dir}; git commit -m '#{version} release notes' --allow-empty")
end

Expand Down

0 comments on commit 149e346

Please sign in to comment.