ci: generate thin manifests, fix linter w/ multiple ebuilds

This commit is contained in:
Jared Allard 2024-02-20 16:46:27 -08:00
parent e5b49b6a71
commit 917d1a5c27
Signed by: jaredallard
SSH key fingerprint: SHA256:wyRyyv28jBYw8Yp/oABNPUYvbGd6hyZj23XVXEm5G/U
2 changed files with 11 additions and 1 deletions

View file

@ -61,7 +61,9 @@ validate_ebuild_manifest() {
info "Validating Manifest" info "Validating Manifest"
pushd "$workPath" >/dev/null || return 1 pushd "$workPath" >/dev/null || return 1
ebuild --color y "$(ls -1 ./*.ebuild)" manifest for ebuild in *.ebuild; do
ebuild --color y "$ebuild" manifest
done
if [[ ! -e "Manifest" ]] && [[ ! -e "$srcPath/Manifest" ]]; then if [[ ! -e "Manifest" ]] && [[ ! -e "$srcPath/Manifest" ]]; then
info "No Manifest in source directory or generated by ebuild command." \ info "No Manifest in source directory or generated by ebuild command." \

View file

@ -31,6 +31,14 @@ MANIFEST_WRITE_PATH="/.well-known/Manifest"
portdir="/src/fake_portdir/$EBUILD_NAME" portdir="/src/fake_portdir/$EBUILD_NAME"
mkdir -p "$portdir" mkdir -p "$portdir"
mkdir -p "$portdir/metadata"
# TODO(jaredallard): This should match the repo.
cat >"$portdir/metadata/layout.conf" <<EOF
masters = gentoo
thin-manifests = true
sign-manifests = false
EOF
pushd "$portdir" >/dev/null || exit 1 pushd "$portdir" >/dev/null || exit 1
ebuild_path="$(basename "$EBUILD_NAME")-$EBUILD_LATEST_VERSION.ebuild" ebuild_path="$(basename "$EBUILD_NAME")-$EBUILD_LATEST_VERSION.ebuild"
cp "$EBUILD_PATH" "$ebuild_path" cp "$EBUILD_PATH" "$ebuild_path"