New layout with subfolders causes incomplete DIST_LAYERS to be generated
in deploy/images/.../build-info.
This patches fixes how git repos are found in the layers directory.
Bug-AGL: SPEC-2450
Change-Id: I4b6a62b68064de12119e668522242677e11c65eb
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
local gitrepo gitrev metagitdir sep=""
DIST_LAYERS=""
- for metagitdir in $(ls -d $DIST_METADIR/*/.git); do
+ for metagitdir in $(find $DIST_METADIR -type d -name ".git"); do
gitrepo=$($REALPATH -Ls $metagitdir/.. --relative-to=$DIST_METADIR)
pushd $DIST_METADIR/$gitrepo &>/dev/null && {
gitrev=$( { $GIT describe --long --dirty --always 2>/dev/null || echo "unknown_revision"; } | tr ' \t' '__' )