[sonic-frr]: Checkout gracefully if branch exists already. (#8289)

If branch exist already, today FRR build fails. Branch may exist on rebuild.
With this PR, we will Checkout branch gracefully if branch exists already.

Signed-off-by: Praveen Chaudhary<pchaudhary@linkedin.com>
This commit is contained in:
Praveen Chaudhary 2021-08-15 00:01:31 -07:00 committed by GitHub
parent 76ed66ca29
commit 144a7bcaf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ STG_BRANCH = stg_temp.$(SUFFIX)
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Build the package
pushd ./frr
git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH)
git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH) || git checkout $(FRR_BRANCH)
stg branch --create $(STG_BRANCH) $(FRR_TAG)
stg import -s ../patch/series
tools/tarsource.sh -V -e '-sonic'