diff options
author | John Estabrook <jestabro@vyos.io> | 2025-03-29 16:14:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-29 16:14:07 -0500 |
commit | 79b357a4afc661a9f9e6ee618ac0ac7ef2a4b20f (patch) | |
tree | 0bae72c2d5b1ce40e208908b40768b1ad27dab7f | |
parent | a2563828340fbc6bc9bc57048a08a1901c61f000 (diff) | |
parent | 856ab11067957b34a98133075eaff5da3c19b9bd (diff) | |
download | vyos-1x-79b357a4afc661a9f9e6ee618ac0ac7ef2a4b20f.tar.gz vyos-1x-79b357a4afc661a9f9e6ee618ac0ac7ef2a4b20f.zip |
Merge pull request #4417 from jestabro/submod-libvyosconfig
T7289: add libvyosconfig as git submodule for builds from private repos
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | Makefile | 14 | ||||
m--------- | libvyosconfig | 0 |
3 files changed, 12 insertions, 6 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..4e9a691c0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "libvyosconfig"] + path = libvyosconfig + url = ../libvyosconfig.git + branch = current @@ -9,6 +9,7 @@ BUILD_ARCH := $(shell dpkg-architecture -q DEB_BUILD_ARCH) J2LINT := $(shell command -v j2lint 2> /dev/null) PYLINT_FILES := $(shell git ls-files *.py src/migration-scripts) LIBVYOSCONFIG_BUILD_PATH := /tmp/libvyosconfig/_build/libvyosconfig.so +LIBVYOSCONFIG_STATUS := $(shell git submodule status) config_xml_src = $(wildcard interface-definitions/*.xml.in) config_xml_obj = $(config_xml_src:.xml.in=.xml) @@ -23,12 +24,13 @@ op_xml_obj = $(op_xml_src:.xml.in=.xml) .PHONY: libvyosconfig .ONESHELL: libvyosconfig: - if ! [ -f $(LIBVYOSCONFIG_BUILD_PATH) ]; then - rm -rf /tmp/libvyosconfig && \ - git clone https://github.com/vyos/libvyosconfig.git /tmp/libvyosconfig || exit 1 - cd /tmp/libvyosconfig && \ - git checkout 27e4b0a5eaf77d9a1f5e1f6dcaa109e5d73c51d1 || exit 1 - eval $$(opam env --root=/opt/opam --set-root) && ./build.sh + if test ! -f $(LIBVYOSCONFIG_BUILD_PATH); then + if ! echo $(firstword $(LIBVYOSCONFIG_STATUS))|grep -Eq '^[0-9]'; then + git submodule sync; git submodule update --init --remote + fi + rm -rf /tmp/libvyosconfig && mkdir /tmp/libvyosconfig + cp -r libvyosconfig /tmp && cd /tmp/libvyosconfig && \ + eval $$(opam env --root=/opt/opam --set-root) && ./build.sh || exit 1 fi .PHONY: interface_definitions diff --git a/libvyosconfig b/libvyosconfig new file mode 160000 +Subproject 27e4b0a5eaf77d9a1f5e1f6dcaa109e5d73c51d |