Reuse fastlane templates from submodule

This commit is contained in:
Davide De Rosa 2019-10-11 18:30:10 +02:00
parent 1916b88243
commit 8c580c2143
27 changed files with 9 additions and 113 deletions

1
.env
View File

@ -1,3 +1,4 @@
PLATFORM="ios"
APP_NAME="Passepartout"
GYM_SCHEME="Passepartout-iOS"
MATCH_READONLY="true"

4
.gitignore vendored
View File

@ -13,8 +13,6 @@ fastlane/metadata/review_information
fastlane/metadata/trade_representative_contact_information
build/
dist/
ci/CHANGELOG.md
ci/DESCRIPTION.md
ci/beta-feedback.txt
templates/
.env.secret*
Preview.html

3
.gitmodules vendored
View File

@ -4,3 +4,6 @@
[submodule "Submodules/Core"]
path = Submodules/Core
url = https://github.com/passepartoutvpn/passepartout-core-apple
[submodule "Submodules/fastlane-ci-templates"]
path = Submodules/fastlane-ci-templates
url = git@github.com:keeshux/fastlane-ci-templates

@ -0,0 +1 @@
Subproject commit 3322ad51f6ac6470da73d232c7b9995ba6aa1828

1
ci Symbolic link
View File

@ -0,0 +1 @@
Submodules/fastlane-ci-templates/ci/

View File

@ -1,2 +0,0 @@
#!/bin/sh
TARGET="beta" bundle exec fastlane --env secret-codesign,beta-archive create_archive

View File

@ -1,2 +0,0 @@
#!/bin/sh
bundle exec fastlane --env secret-codesign,secret-deploy update_provisioning type:appstore readonly:false

View File

@ -1,4 +0,0 @@
#!/bin/sh
VERSION=`agvtool mvers -terse1`
BUILD=`agvtool vers -terse`
TARGET="beta" bundle exec fastlane --env secret-deploy,beta-deploy beta_deploy && git tag "v$VERSION-b$BUILD"

View File

@ -1,4 +0,0 @@
#!/bin/sh
BASE=`agvtool what-version -terse`
COUNT=`git rev-list --count HEAD`
echo $((BASE + COUNT))

View File

@ -1,13 +0,0 @@
#!/bin/sh
VERSION=`ci/version-number.sh`
BUILD=$((`ci/build-number.sh` + 1))
DATE=`date "+%Y-%m-%d"`
CHANGELOG="CHANGELOG.md"
RELEASE_NOTES="fastlane/metadata/en-US/release_notes.txt"
sed "s/Unreleased/$VERSION Beta $BUILD ($DATE)/" $CHANGELOG >$CHANGELOG.tmp
mv $CHANGELOG.tmp $CHANGELOG
ci/latest-changelog.sh | ci/strip-issues.sh >ci/$CHANGELOG
cp ci/$CHANGELOG $RELEASE_NOTES
git add $CHANGELOG $RELEASE_NOTES
git commit -m "Set beta release"

View File

@ -1,2 +0,0 @@
#!/bin/sh
TARGET="dev" bundle exec fastlane --env secret-codesign,dev-archive create_archive

View File

@ -1,2 +0,0 @@
#!/bin/sh
bundle exec fastlane --env secret-codesign,secret-deploy update_provisioning type:adhoc readonly:false

View File

@ -1,4 +0,0 @@
#!/bin/sh
VERSION=`agvtool mvers -terse1`
BUILD=`agvtool vers -terse`
TARGET="dev" bundle exec fastlane --env secret-deploy,dev-deploy dev_deploy #&& git tag "v$VERSION-a$BUILD"

View File

@ -1,6 +0,0 @@
#!/bin/sh
TARGET="CHANGELOG.md"
RELEASES=(`grep -n "^## " $TARGET | sed -E "s/^([0-9]+).*$/\1/g"`)
UNRELEASED=${RELEASES[0]}
LATEST=${RELEASES[1]}
cat $TARGET | head -n $((LATEST - 1)) | tail -n $((LATEST - UNRELEASED - 2))

View File

@ -1,2 +0,0 @@
#!/bin/sh
bundle exec fastlane run increment_build_number build_number:$1

View File

@ -1,2 +0,0 @@
#!/bin/sh
agvtool new-marketing-version $1

View File

@ -1,2 +0,0 @@
#!/bin/sh
sed -E "s/^(.*)\. .*$/\1./"

View File

@ -1,2 +0,0 @@
#!/bin/sh
bundle exec fastlane --env secret-deploy update_metadata

View File

@ -1,2 +0,0 @@
#!/bin/sh
bundle exec fastlane --env secret-deploy update_screenshots

View File

@ -1,2 +0,0 @@
#!/bin/sh
agvtool what-marketing-version -terse1

View File

@ -13,63 +13,6 @@
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
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"
default_platform(:ios)
desc "Prepare a new build"
lane :prepare_archive do
ensure_git_status_clean
cocoapods
get_build_number
base_build_number = lane_context[SharedValues::BUILD_NUMBER].to_i
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(build_changelog_path)
end
desc "Submit a build to App Center"
lane :dev_deploy do
set_build_changelog
appcenter_upload
end
desc "Submit a build to TestFlight"
lane :beta_deploy do
set_build_changelog
pilot(
beta_app_description: File.read(build_description_path),
beta_app_feedback_email: File.read(beta_feedback_path)
)
end
desc "Update App Store metadata"
lane :update_metadata do
deliver(
skip_screenshots: true
)
end
desc "Update App Store screenshots"
lane :update_screenshots do
deliver(
skip_metadata: true
)
end
desc "Update provisioning profiles"
lane :update_provisioning do |options|
match(options)
end
import("../Submodules/fastlane-ci-templates/include/Fastfile.include")