mirror of
https://github.com/libretro/RetroArch
synced 2025-02-15 18:39:55 +00:00
* iOS: Add fastlane for TestFlight automation * tvOS: Add fastlane for TestFlight automation
135 lines
4.2 KiB
Ruby
135 lines
4.2 KiB
Ruby
# 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
|
|
|
|
default_platform(:ios)
|
|
|
|
platform :ios do
|
|
desc "Push a new beta build to TestFlight"
|
|
lane :beta do
|
|
# this needs these environment variables set:
|
|
# APP_STORE_CONNECT_API_KEY_KEY_ID,
|
|
# APP_STORE_CONNECT_API_KEY_ISSUER_ID,
|
|
# APP_STORE_CONNECT_API_KEY_KEY_FILEPATH
|
|
app_store_connect_api_key
|
|
|
|
reset_git_repo(
|
|
force: true,
|
|
files: [
|
|
"./assets.zip",
|
|
"./iOS/Info.plist"
|
|
]
|
|
)
|
|
ensure_git_status_clean
|
|
git_pull
|
|
app_store_build_number(
|
|
app_identifier: "com.libretro.dist.RetroArch",
|
|
platform: "ios",
|
|
username: "libretro@gmail.com",
|
|
team_id: "118576492",
|
|
live: true
|
|
)
|
|
latest_testflight_build_number(
|
|
app_identifier: "com.libretro.dist.RetroArch",
|
|
platform: "ios",
|
|
username: "libretro@gmail.com",
|
|
team_id: "118576492"
|
|
)
|
|
next_version_number = lane_context[SharedValues::LATEST_TESTFLIGHT_VERSION]
|
|
if lane_context[SharedValues::LATEST_VERSION] == lane_context[SharedValues::LATEST_TESTFLIGHT_VERSION]
|
|
version_array = next_version_number.split(".").map(&:to_i)
|
|
version_array[-1] = version_array[-1] + 1
|
|
next_version_number = version_array.join(".")
|
|
end
|
|
# can't use update_build_number/agvtool to update this as it
|
|
# doesn't deal with multiple projects in the same folder
|
|
update_info_plist(
|
|
plist_path: "iOS/Info.plist",
|
|
block: proc do |plist|
|
|
plist["CFBundleVersion"] = (lane_context[SharedValues::LATEST_TESTFLIGHT_BUILD_NUMBER] + 1).to_s
|
|
plist["CFBundleShortVersionString"] = next_version_number
|
|
end
|
|
)
|
|
build_app(
|
|
workspace: "RetroArch.xcworkspace",
|
|
scheme: "RetroArch iOS Release",
|
|
xcconfig: "iOS/AppStore.xcconfig"
|
|
)
|
|
upload_to_testflight(
|
|
distribute_external: true,
|
|
groups: "Invaders, Patreons",
|
|
changelog: "Rebuild frontend from latest master branch and take latest build of all cores."
|
|
)
|
|
end
|
|
end
|
|
|
|
platform :appletvos do
|
|
desc "Push a new beta build to TestFlight"
|
|
lane :beta do
|
|
# this needs these environment variables set:
|
|
# APP_STORE_CONNECT_API_KEY_KEY_ID,
|
|
# APP_STORE_CONNECT_API_KEY_ISSUER_ID,
|
|
# APP_STORE_CONNECT_API_KEY_KEY_FILEPATH
|
|
app_store_connect_api_key
|
|
|
|
reset_git_repo(
|
|
force: true,
|
|
files: [
|
|
"./assets.zip",
|
|
"./tvOS/Info.plist"
|
|
]
|
|
)
|
|
ensure_git_status_clean
|
|
git_pull
|
|
app_store_build_number(
|
|
app_identifier: "com.libretro.dist.RetroArch",
|
|
platform: "appletvos",
|
|
username: "libretro@gmail.com",
|
|
team_id: "118576492",
|
|
live: true
|
|
)
|
|
latest_testflight_build_number(
|
|
app_identifier: "com.libretro.dist.RetroArch",
|
|
platform: "appletvos",
|
|
username: "libretro@gmail.com",
|
|
team_id: "118576492"
|
|
)
|
|
next_version_number = lane_context[SharedValues::LATEST_TESTFLIGHT_VERSION]
|
|
if lane_context[SharedValues::LATEST_VERSION] == lane_context[SharedValues::LATEST_TESTFLIGHT_VERSION]
|
|
version_array = next_version_number.split(".").map(&:to_i)
|
|
version_array[-1] = version_array[-1] + 1
|
|
next_version_number = version_array.join(".")
|
|
end
|
|
# can't use update_build_number/agvtool to update this as it
|
|
# doesn't deal with multiple projects in the same folder
|
|
update_info_plist(
|
|
plist_path: "tvOS/Info.plist",
|
|
block: proc do |plist|
|
|
plist["CFBundleVersion"] = (lane_context[SharedValues::LATEST_TESTFLIGHT_BUILD_NUMBER] + 1).to_s
|
|
plist["CFBundleShortVersionString"] = next_version_number
|
|
end
|
|
)
|
|
build_app(
|
|
workspace: "RetroArch.xcworkspace",
|
|
scheme: "RetroArch tvOS Release",
|
|
xcconfig: "iOS/AppStore.xcconfig"
|
|
)
|
|
upload_to_testflight(
|
|
distribute_external: true,
|
|
groups: "Invaders, Patreons",
|
|
changelog: "Rebuild frontend from latest master branch and take latest build of all cores."
|
|
)
|
|
end
|
|
end
|