Refactor fastlane scripts
This commit is contained in:
parent
84c13737dd
commit
42f204c136
17
.env
17
.env
|
@ -1,12 +1,9 @@
|
|||
LC_ALL="en_US.UTF-8"
|
||||
LANG="en_US.UTF-8"
|
||||
|
||||
STAGE_BUILD_PATH="build/$TARGET"
|
||||
STAGE_ARTIFACTS_PATH="dist/$TARGET"
|
||||
STAGE_ARCHIVE_NAME="Passepartout"
|
||||
BUILD_CHANGELOG_PATH="ci/CHANGELOG.md"
|
||||
BUILD_DESCRIPTION_PATH="ci/DESCRIPTION.md"
|
||||
|
||||
APP_NAME="Passepartout"
|
||||
GYM_SCHEME="Passepartout-iOS"
|
||||
MATCH_READONLY="true"
|
||||
IPA_OUTPUT_PATH="$STAGE_ARTIFACTS_PATH/$STAGE_ARCHIVE_NAME.ipa"
|
||||
BUILD_PATH="build"
|
||||
DIST_PATH="dist"
|
||||
|
||||
# constant (fastlane)
|
||||
LC_ALL="en_US.UTF-8"
|
||||
LANG="en_US.UTF-8"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
PILOT_IPA=$IPA_OUTPUT_PATH
|
||||
PILOT_IPA="$DIST_PATH/$TARGET/$APP_NAME.ipa"
|
||||
PILOT_DISTRIBUTE_EXTERNAL="true"
|
||||
DEMO_ACCOUNT_REQUIRED="true"
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
APPCENTER_APP_NAME="Passepartout"
|
||||
APPCENTER_DISTRIBUTE_IPA=$IPA_OUTPUT_PATH
|
||||
#FL_HOCKEY_COMMIT_SHA=$(git rev-parse HEAD)
|
||||
#FL_HOCKEY_COMMIT_SHA=$CI_COMMIT_SHA
|
||||
#FL_HOCKEY_BUILD_SERVER_URL="$CI_PROJECT_URL/-/jobs/$CI_JOB_ID"
|
||||
#FL_HOCKEY_REPOSITORY_URL=$CI_PROJECT_URL
|
||||
#FL_HOCKEY_STRATEGY="replace"
|
||||
APPCENTER_APP_NAME=$GYM_SCHEME
|
||||
APPCENTER_DISTRIBUTE_IPA="$DIST_PATH/$TARGET/$APP_NAME.ipa"
|
||||
APPCENTER_DISTRIBUTE_DESTINATION_TYPE="group"
|
||||
|
|
|
@ -3,7 +3,7 @@ FASTLANE_USERNAME=
|
|||
FASTLANE_PASSWORD=
|
||||
APPCENTER_OWNER_NAME=
|
||||
APPCENTER_API_TOKEN=
|
||||
#APPCENTER_DISTRIBUTE_GROUP=
|
||||
APPCENTER_DISTRIBUTE_DESTINATIONS=
|
||||
PILOT_GROUPS=
|
||||
PILOT_USERNAME=
|
||||
DELIVER_USERNAME=
|
||||
|
|
|
@ -15,5 +15,6 @@ build/
|
|||
dist/
|
||||
ci/CHANGELOG.md
|
||||
ci/DESCRIPTION.md
|
||||
ci/beta-feedback.txt
|
||||
.env.secret*
|
||||
Preview.html
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
. .env.secret-deploy
|
||||
SRC=$PROJECT_ROOT/api/v2
|
||||
DST=$PROJECT_ROOT/passepartout-ios/Passepartout/Resources/Web
|
||||
rm -rf $DST && cp -pr $SRC $DST
|
|
@ -13,11 +13,12 @@
|
|||
# Uncomment the line if you want fastlane to automatically update itself
|
||||
# update_fastlane
|
||||
|
||||
default_platform(:ios)
|
||||
build_description_path = "../ci/DESCRIPTION.md" # "../#{ENV["BUILD_DESCRIPTION_PATH"]}"
|
||||
build_changelog_path = "../ci/CHANGELOG.md" # "../#{ENV["BUILD_CHANGELOG_PATH"]}"
|
||||
beta_feedback_path = "../ci/beta-feedback.txt"
|
||||
|
||||
platform :ios do
|
||||
desc "Archive a new build"
|
||||
lane :create_archive do
|
||||
desc "Prepare a new build"
|
||||
lane :prepare_archive do
|
||||
ensure_git_status_clean
|
||||
cocoapods
|
||||
get_build_number
|
||||
|
@ -25,13 +26,18 @@ platform :ios do
|
|||
increment_build_number(
|
||||
build_number: base_build_number + number_of_commits
|
||||
)
|
||||
end
|
||||
|
||||
desc "Archive a new build"
|
||||
lane :create_archive do
|
||||
prepare_archive
|
||||
match
|
||||
gym
|
||||
end
|
||||
|
||||
desc "Set build changelog"
|
||||
lane :set_build_changelog do
|
||||
lane_context[SharedValues::FL_CHANGELOG] = File.read("../#{ENV["BUILD_CHANGELOG_PATH"]}")
|
||||
lane_context[SharedValues::FL_CHANGELOG] = File.read(build_changelog_path)
|
||||
end
|
||||
|
||||
desc "Submit a build to App Center"
|
||||
|
@ -44,7 +50,8 @@ platform :ios do
|
|||
lane :beta_deploy do
|
||||
set_build_changelog
|
||||
pilot(
|
||||
beta_app_description: File.read("../#{ENV["BUILD_DESCRIPTION_PATH"]}")
|
||||
beta_app_description: File.read(build_description_path),
|
||||
beta_app_feedback_email: File.read(beta_feedback_path)
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -66,4 +73,3 @@ platform :ios do
|
|||
lane :update_provisioning do |options|
|
||||
match(options)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,11 +10,15 @@
|
|||
|
||||
# sdk "iphoneos9.0"
|
||||
|
||||
derived_data_path ENV["STAGE_BUILD_PATH"]
|
||||
buildlog_path ENV["STAGE_BUILD_PATH"]
|
||||
build_path ENV["STAGE_BUILD_PATH"]
|
||||
output_directory ENV["STAGE_ARTIFACTS_PATH"]
|
||||
output_name ENV["STAGE_ARCHIVE_NAME"]
|
||||
build_target = ENV["TARGET"]
|
||||
stage_build_path = "#{ENV["BUILD_PATH"]}/#{build_target}"
|
||||
stage_artifacts_path = "#{ENV["DIST_PATH"]}/#{build_target}"
|
||||
|
||||
derived_data_path stage_build_path
|
||||
buildlog_path stage_build_path
|
||||
build_path stage_build_path
|
||||
output_directory stage_artifacts_path
|
||||
output_name ENV["APP_NAME"]
|
||||
|
||||
clean true
|
||||
silent false
|
||||
|
|
Loading…
Reference in New Issue