sonic-buildimage/platform/checkout/template.j2
VenkatCisco 8093ab2024 Platform/cisco-8000 module for sonic-buildimage (#8172)
Why I did it
Update Makefile, so it does the following:
For a given platform, verify if platform/checkout/.ini exists and hence run the platform/checkout/template.j2. This allows platform code to be checked out during the 'make configure' stage.

How I did it
git clone git@github.com:Azure/sonic-buildimage.git
mkdir platform/cisco-8000

make init
make configure PLATFORM=cisco-8000
make all
2021-08-06 20:42:10 -07:00

12 lines
381 B
Django/Jinja

{% set path = env('PLATFORM_PATH') %}
if [ ! -d {{ path }} ]; then git clone {{ module.repo }} {{ path }}; fi;
if [ -d {{ path }}/.git ]; then cd {{ path }} &&
{% if module.ref is defined %}
git checkout {{ module.ref }} && git submodule update --init --recursive;
{% else %}
git submodule update --init --recursive;
{% endif %}
else echo "{{ path }}/.git not found"; exit 1; fi