Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FRR]: Use stg in a proper way. #3589

Merged
merged 3 commits into from
Oct 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ SHELL = /bin/bash

MAIN_TARGET = $(FRR)
DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG) $(FRR_SNMP) $(FRR_SNMP_DBG)
BRANCH = $(shell date +%Y%m%d\.%H%M%S)
FRR_BRANCH = frr/$(FRR_VERSION)
STG_BRANCH = stg_temp

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Build the package
pushd ./frr
git checkout -b $(BRANCH) origin/frr/7.1
stg init
pushd ./frr
git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH)
stg branch --create $(STG_BRANCH) $(FRR_BRANCH)
stg import -s ../patch/series
tools/tarsource.sh -V -e '-sonic'
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
stg undo
git clean -xfdf
git checkout frr/7.1
git branch -D $(BRANCH)
git checkout $(FRR_BRANCH)
stg branch --delete $(STG_BRANCH)
git rev-parse --short HEAD | xargs git checkout
git branch -D $(FRR_BRANCH)
popd
mv $(DERIVED_TARGET) $* $(DEST)/

Expand Down