Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(flatpak): use local exceptions #3679

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 10 additions & 39 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,52 +227,23 @@ jobs:
- name: Lint Flatpak
working-directory: build
run: |
exceptions_file="${{ github.workspace }}/packaging/linux/flatpak/exceptions.json"

echo "Linting flatpak manifest"
flatpak run --command=flatpak-builder-lint org.flatpak.Builder \
manifest ${APP_ID}.yml > _flatpak-lint-exceptions_manifest.json || true
--exceptions \
--user-exceptions "${exceptions_file}" \
manifest \
${APP_ID}.yml

echo "Linting flatpak repo"
# TODO: add arg
# --mirror-screenshots-url=https://dl.flathub.org/media \
flatpak run --command=flatpak-builder-lint org.flatpak.Builder \
repo repo > _flatpak-lint-exceptions_repo.json || true

checks=(manifest repo)
exit_code=0

# check if files are equal
for check in "${checks[@]}"; do
echo "Validating $check"

# load baseline and result files
baseline="${{ github.workspace }}/packaging/linux/flatpak/flatpak-lint-baseline_${check}.json"
result="_flatpak-lint-exceptions_${check}.json"

# Extract errors from both JSON files
readarray -t result_errors < <(jq -r '.errors[]' "$result")
readarray -t baseline_errors < <(jq -r '.errors[]' "$baseline")

# Loop through result errors and check against baseline errors
for error in "${result_errors[@]}"; do
if printf '%s\n' "${baseline_errors[@]}" | grep -q -F "$error"; then
echo "::warning:: '$error'"
else
echo "::error:: '$error'"
exit_code=1
fi
done
done

# if exit code is not 0, print results
if [ $exit_code -ne 0 ]; then
echo "Manifest lint results:"
cat _flatpak-lint-exceptions_manifest.json
echo "Repo lint results:"
cat _flatpak-lint-exceptions_repo.json
fi

# exit with the correct code
exit $exit_code
--exceptions \
--user-exceptions "${exceptions_file}" \
repo \
repo

- name: Package Flathub repo archive
# copy files required to generate the Flathub repo
Expand Down
21 changes: 15 additions & 6 deletions packaging/linux/flatpak/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Overview
<div align="center">
<img src="https://raw.githubusercontent.com/LizardByte/Sunshine/master/sunshine.png" />
<h1 align="center">Sunshine</h1>
<h4 align="center">Self-hosted game stream host for Moonlight.</h4>
</div>

[![Flathub installs](https://img.shields.io/flathub/downloads/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub)](https://flathub.org/apps/dev.lizardbyte.app.Sunshine)
[![Flathub Version](https://img.shields.io/flathub/v/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub)](https://flathub.org/apps/dev.lizardbyte.app.Sunshine)
<div align="center">
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine"><img src="https://img.shields.io/flathub/downloads/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub installs"></a>
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine"><img src="https://img.shields.io/flathub/v/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub Version"></a>
</div>

LizardByte has the full documentation hosted on [Read the Docs](https://docs.lizardbyte.dev/projects/sunshine).

## About
## ℹ️ About

Sunshine is a self-hosted game stream host for Moonlight.

LizardByte has the full documentation hosted on [Read the Docs](https://docs.lizardbyte.dev/projects/sunshine)

* [Stable](https://docs.lizardbyte.dev/projects/sunshine/latest/)
* [Beta](https://docs.lizardbyte.dev/projects/sunshine/master/)

This repo is synced from the upstream [Sunshine](https://github.com/LizardByte/Sunshine) repo.
Please report issues and contribute to the upstream repo.
8 changes: 8 additions & 0 deletions packaging/linux/flatpak/exceptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"dev.lizardbyte.app.Sunshine": [
"appstream-missing-screenshots",
"appstream-screenshots-not-mirrored-in-ostree",
"external-gitmodule-url-found",
"finish-args-flatpak-spawn-access"
]
}
9 changes: 0 additions & 9 deletions packaging/linux/flatpak/flatpak-lint-baseline_manifest.json

This file was deleted.

11 changes: 0 additions & 11 deletions packaging/linux/flatpak/flatpak-lint-baseline_repo.json

This file was deleted.

Loading