[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)
|
MAIN_TARGET = $(FRR)
|
||||||
DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG) $(FRR_SNMP) $(FRR_SNMP_DBG)
|
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)/% :
|
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||||
# Build the package
|
# Build the package
|
||||||
pushd ./frr
|
pushd ./frr
|
||||||
git checkout -b $(BRANCH) origin/frr/7.1
|
git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH)
|
||||||
stg init
|
stg branch --create $(STG_BRANCH) $(FRR_BRANCH)
|
||||||
stg import -s ../patch/series
|
stg import -s ../patch/series
|
||||||
tools/tarsource.sh -V -e '-sonic'
|
tools/tarsource.sh -V -e '-sonic'
|
||||||
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
|
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
|
||||||
stg undo
|
stg undo
|
||||||
git clean -xfdf
|
git clean -xfdf
|
||||||
git checkout frr/7.1
|
git checkout $(FRR_BRANCH)
|
||||||
git branch -D $(BRANCH)
|
stg branch --delete $(STG_BRANCH)
|
||||||
|
git rev-parse --short HEAD | xargs git checkout
|
||||||
|
git branch -D $(FRR_BRANCH)
|
||||||
popd
|
popd
|
||||||
mv $(DERIVED_TARGET) $* $(DEST)/
|
mv $(DERIVED_TARGET) $* $(DEST)/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user