Skip to content

Commit

Permalink
build: generate index.json
Browse files Browse the repository at this point in the history
The index.json file lies next to Packages index files and contains a
json dict with the package architecture and a dict of package names and
versions.

This can be used for downstream project to know what packages in which
versions are available.

Signed-off-by: Paul Spooren <[email protected]>
  • Loading branch information
aparcar committed May 9, 2023
1 parent 3da70c6 commit 218ce40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ $(curdir)/index: FORCE
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
{ echo ""; echo ""; } >> Packages;; \
esac; \
echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \
sed -n -e 's/^Package: \(.*\)$$/"\1":/p' -e 's/^Version: \(.*\)$$/"\1",/p' Packages | tr '\n' ' ' >> index.json; \
echo '}}' >> index.json; \
sed -i 's/, }}/}}/' index.json; \
gzip -9nc Packages > Packages.gz; \
); done
ifdef CONFIG_SIGNED_PACKAGES
Expand Down

0 comments on commit 218ce40

Please sign in to comment.