mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 13:37:11 +00:00
fastlane: rebase main with develop after a release
moved the git fetch into the setup of xcode cloud fix
This commit is contained in:
parent
7373eabffb
commit
9c8404a3cb
@ -27,6 +27,8 @@ setup_xcode_cloud_environment () {
|
|||||||
|
|
||||||
bundle config path vendor/bundle
|
bundle config path vendor/bundle
|
||||||
bundle install --jobs 4 --retry 3
|
bundle install --jobs 4 --retry 3
|
||||||
|
# Xcode Cloud shallow clones the repo. We need to deepen it to fetch tags, commit history and be able to rebase main on develop at the end of releases.
|
||||||
|
git fetch --unshallow --quiet
|
||||||
}
|
}
|
||||||
|
|
||||||
install_xcode_cloud_brew_dependencies () {
|
install_xcode_cloud_brew_dependencies () {
|
||||||
@ -57,10 +59,6 @@ generate_what_to_test_notes() {
|
|||||||
TESTFLIGHT_DIR_PATH=TestFlight
|
TESTFLIGHT_DIR_PATH=TestFlight
|
||||||
TESTFLIGHT_NOTES_FILE_NAME=WhatToTest.en-US.txt
|
TESTFLIGHT_NOTES_FILE_NAME=WhatToTest.en-US.txt
|
||||||
|
|
||||||
# Xcode Cloud shallow clones the repo, we need to deepen it to fetch tags and commit history
|
|
||||||
# Instead of trying `--deepen=<depth>` just do a full unshallow to avoid future surprises
|
|
||||||
git fetch --unshallow --quiet
|
|
||||||
|
|
||||||
LATEST_TAG=""
|
LATEST_TAG=""
|
||||||
if [ "$CI_WORKFLOW" = "Release" ]; then
|
if [ "$CI_WORKFLOW" = "Release" ]; then
|
||||||
# Use -v to invert grep, searching for non-nightlies
|
# Use -v to invert grep, searching for non-nightlies
|
||||||
|
@ -280,6 +280,24 @@ lane :prepare_next_release do
|
|||||||
sh("git commit -m 'Prepare next release'")
|
sh("git commit -m 'Prepare next release'")
|
||||||
|
|
||||||
git_push()
|
git_push()
|
||||||
|
|
||||||
|
rebase_main_onto_current_branch()
|
||||||
|
end
|
||||||
|
|
||||||
|
def rebase_main_onto_current_branch
|
||||||
|
# Capture the current branch name
|
||||||
|
current_branch = sh("git rev-parse --abbrev-ref HEAD").strip
|
||||||
|
|
||||||
|
UI.message("Current branch: #{current_branch}")
|
||||||
|
|
||||||
|
# Switch to main and update it
|
||||||
|
sh("git checkout main")
|
||||||
|
sh("git pull origin main")
|
||||||
|
sh("git rebase #{current_branch}")
|
||||||
|
|
||||||
|
git_push()
|
||||||
|
|
||||||
|
UI.success("Successfully rebased main onto #{current_branch}")
|
||||||
end
|
end
|
||||||
|
|
||||||
lane :tag_nightly do |options|
|
lane :tag_nightly do |options|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user