Skip to content

Commit

Permalink
Run snapshot test using corresponding branch
Browse files Browse the repository at this point in the history
This commit extend clone-snapshots-ci make command by running checkout.sh script, which tries to make checkout to the source branch in Snapshots if it exists, otherwise tries to make checkout to the destination branch if it exists, otherwise makes checkout to master branch

MOB-3716
  • Loading branch information
Egor Egorov authored and ykyivskyi-gl committed Nov 12, 2024
1 parent 5f4bc1f commit cc63f1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ clone-snapshots:
@echo " ⏬ Cloning snapshots..."
@command git clone [email protected]:salemove/ios-widgets-snapshots.git SnapshotTests/__Snapshots__

source_branch := $(shell git rev-parse --abbrev-ref HEAD)
clone-snapshots-ci:
@echo " ⏬ Cloning snapshots..."
@command git clone $(repo_url) SnapshotTests/__Snapshots__
@command cd SnapshotTests/__Snapshots__ && ./checkout.sh $(SOURCE_BRANCH) $(destination_branch)

commit-snapshots:
@echo " 💾 Commiting snapshots..."
@echo " 💾 Committing snapshots..."
@command cd SnapshotTests/__Snapshots__ && git add . && git commit -a -m "Update snapshots."

push-snapshots:
Expand Down
2 changes: 1 addition & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ workflows:
inputs:
- content: |-
#!/usr/bin/env bash # fail if any commands fails set -e # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully set -o pipefail # debug log set -x
make clone-snapshots-ci repo_url="https://$GITHUB_USERNAME:$GITHUB_API_TOKEN@$SNAPSHOTS_REPO"
make clone-snapshots-ci repo_url="https://$GITHUB_USERNAME:$GITHUB_API_TOKEN@$SNAPSHOTS_REPO" destination_branch=$BITRISEIO_GIT_BRANCH_DEST
- cache-pull@2: {}
- certificate-and-profile-installer@1: {}
- script:
Expand Down

0 comments on commit cc63f1b

Please sign in to comment.