Skip to content

Commit

Permalink
fix: origin url proper verification (babylonchain#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen authored May 18, 2024
1 parent 9b779da commit 74333ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ jobs:
command: |
originUrl=$(git remote get-url origin)
currBranch=$(git rev-parse --abbrev-ref HEAD)
if [ "main" == "$currBranch" ] && [ *"babylonchain/networks.git"* == "$originUrl" ]; then
if [ "main" == "$currBranch" ] && [[ "$originUrl" =~ .*"babylonchain/networks.git".* ]]; then
echo "Merge on main"
ALL_CHANGED_FILES=$(git diff HEAD~1 --name-only **/finality-providers/registry/)
else
git remote add bbnRepo https://github.com/babylonchain/networks.git
Expand Down Expand Up @@ -113,7 +114,7 @@ jobs:
command: |
originUrl=$(git remote get-url origin)
currBranch=$(git rev-parse --abbrev-ref HEAD)
if [ "main" == "$currBranch" ] && [ *"babylonchain/networks.git"* == "$originUrl" ]; then
if [ "main" == "$currBranch" ] && [[ "$originUrl" =~ .*"babylonchain/networks.git".* ]]; then
ALL_CHANGED_FILES=$(git diff HEAD~1 --name-only **/finality-providers/registry/)
else
git remote add bbnRepo https://github.com/babylonchain/networks.git
Expand Down Expand Up @@ -156,7 +157,7 @@ jobs:
command: |
originUrl=$(git remote get-url origin)
currBranch=$(git rev-parse --abbrev-ref HEAD)
if [ "main" == "$currBranch" ] && [ *"babylonchain/networks.git"* == "$originUrl" ]; then
if [ "main" == "$currBranch" ] && [[ "$originUrl" =~ .*"babylonchain/networks.git".* ]]; then
ALL_CHANGED_FILES=$(git diff HEAD~1 --name-only **/finality-providers/registry/)
else
git remote add bbnRepo https://github.com/babylonchain/networks.git
Expand Down

0 comments on commit 74333ab

Please sign in to comment.