passepartout-apple/fastlane/Fastfile

73 lines
1.7 KiB
Plaintext
Raw Normal View History

# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
2024-09-23 13:02:26 +00:00
fastlane_require "dotenv"
Dotenv.load ".env.secret"
setup_ci if ENV["CI"]
logname = "CHANGELOG.txt"
desc "Bump version"
lane :bump do |options|
version = options[:version]
2024-09-23 13:25:16 +00:00
build = options[:build]
increment_build_number(build_number: build)
2024-09-23 13:02:26 +00:00
unless version.nil? || version.empty?
increment_version_number_in_xcodeproj(version_number: version)
end
log = changelog_from_git_commits(
pretty: "* %h %s",
date_format: "short"
)
File.open("../#{logname}", "w") { |file|
file.write(log)
}
commit_version_bump(
message: "Bump version",
include: [logname]
)
2024-09-23 13:25:16 +00:00
add_git_tag(
includes_lane: false,
sign: true
)
2024-09-23 13:02:26 +00:00
end
desc "Push a new beta build to TestFlight"
lane :beta do
prelog = File.read("../#{logname}.testflight")
2024-09-23 13:02:26 +00:00
log = File.read("../#{logname}")
changelog = prelog + "\n\n" + log
2024-09-23 13:02:26 +00:00
match(type: "appstore")
gym(
clean: true,
build_path: "build",
derived_data_path: "build/derived_data"
)
pilot(
changelog: changelog,
2024-09-23 13:02:26 +00:00
distribute_external: true,
notify_external_testers: false
)
end
desc "Distribute to Public Beta"
lane :public_beta do
pilot(
distribute_only: true,
distribute_external: true,
notify_external_testers: true
)
end