Skip to content

Commit

Permalink
[FRR]: Use stg in a proper way. (#3589)
Browse files Browse the repository at this point in the history
* [FRR]: Use stg in a proper way.

Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>

* [FRR]restore the detach status for frr submodule after finish patching

Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>

* [FRR]use the 'FRR_VERSION' exported from 'rule/frr.mk'.

Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>
  • Loading branch information
wangshengjun authored and pavel-shirshov committed Oct 15, 2019
1 parent 0d2aa7f commit 34d8842
Showing 1 changed file with 9 additions and 6 deletions.
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

0 comments on commit 34d8842

Please sign in to comment.