[FRR]: Use stg in a proper way. (#3589)
* [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>
This commit is contained in:
parent
0d2aa7fb5b
commit
34d8842fbd
@ -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
|
||||
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)/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user