build: configure a flatpak - #285
Conversation
📝 WalkthroughWalkthroughAdds Flathub packaging (Flatpak manifest, AppStream metainfo, desktop entry, launcher, Makefile, .gitignore, verified-apps entry) for the Deepink desktop app and removes the ChangesFlathub Publication Setup
Workflow Trigger Configuration
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer/CI
participant Builder as flatpak-builder
participant Repo as Flatpak Repo (export)
participant Bundle as flatpak build-bundle
participant Flathub as Flathub
Dev->>Builder: run flatpak-builder with `app.deepink.Deepink.yaml`
Builder->>Repo: build-export repository (stable)
Repo->>Bundle: build-bundle -> `deepink.flatpak`
Bundle->>Flathub: upload/publish bundle
Flathub-->>Dev: serve app to users
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/app/scripts/flathub/app.deepink.Deepink.yaml`:
- Around line 64-65: The install command's source path is missing the extracted
archive root (Deepink-linux-x64) so it looks for /app/lib/deepink/resources/...
instead of /app/lib/deepink/Deepink-linux-x64/resources/.... Update the install
invocation that references "install -Dm644
/app/lib/deepink/resources/assets/icons/app.png ..." to include the intermediate
"Deepink-linux-x64" directory (i.e.
/app/lib/deepink/Deepink-linux-x64/resources/assets/icons/app.png), or
alternatively modify the earlier extraction step to strip the top-level
directory (use tar/bsdtar/unzip options in the build-commands) so files land
directly under /app/lib/deepink and the existing install path remains valid.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 589c6f16-1094-4f24-89c5-1e1c3465dd14
📒 Files selected for processing (5)
.github/workflows/site.ymlpackages/app/scripts/flathub/app.deepink.Deepink.desktoppackages/app/scripts/flathub/app.deepink.Deepink.metainfo.xmlpackages/app/scripts/flathub/app.deepink.Deepink.yamlpackages/app/scripts/flathub/deepink.sh
💤 Files with no reviewable changes (1)
- .github/workflows/site.yml
Cloudflare Pages DeploymentEvent Name: pull_request Wrangler Output⛅️ wrangler 4.87.0 🌎 Deploying... |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/app/scripts/flathub/app.deepink.Deepink.yaml (1)
50-65:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix archive root handling before chmod/icon install.
Line 50 currently copies the ZIP contents in a way that preserves the top-level
Deepink-linux-x64/directory, but Lines 51 and 64 assume files were flattened. That can break the build (chmod/installsource not found).Suggested fix
- - cp -r artifacts/app/* /app/lib/deepink + - cp -r artifacts/app/Deepink-linux-x64/* /app/lib/deepink - chmod +x /app/lib/deepink/deepink ... - install -Dm644 /app/lib/deepink/resources/assets/icons/app.png /app/share/icons/hicolor/256x256/apps/app.deepink.Deepink.png🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/app/scripts/flathub/app.deepink.Deepink.yaml` around lines 50 - 65, The install steps assume the ZIP was extracted flat but the archive keeps a top-level Deepink-linux-x64/ directory, so subsequent chmod/install paths (targeting /app/lib/deepink/deepink and /app/lib/deepink/resources/...) fail; update the copy step (the current "cp -r artifacts/app/* /app/lib/deepink") to either copy the contents of the archive root into /app/lib/deepink (detect and strip the single top-level directory) or adjust the chmod/install source paths to include that top-level folder; ensure deepink binary (deepink) and resources/assets/icons/app.png are referenced correctly after flattening, and keep deepink.sh installation unchanged.
🧹 Nitpick comments (1)
packages/app/scripts/flathub/Makefile (1)
9-14: Declareinstallandcleantargets as.PHONY.These command-only targets should be declared as phony to prevent accidental no-op behavior if files or directories with these names are created.
Add the following line at the beginning of the Makefile:
.PHONY: install clean🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/app/scripts/flathub/Makefile` around lines 9 - 14, Add a .PHONY declaration for the Makefile targets to mark them as phony; specifically add a line declaring ".PHONY: install clean" near the top of the Makefile so the "install" and "clean" targets (used by flatpak-builder and rm -rf) are always executed regardless of files or directories named "install" or "clean".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@packages/app/scripts/flathub/app.deepink.Deepink.yaml`:
- Around line 50-65: The install steps assume the ZIP was extracted flat but the
archive keeps a top-level Deepink-linux-x64/ directory, so subsequent
chmod/install paths (targeting /app/lib/deepink/deepink and
/app/lib/deepink/resources/...) fail; update the copy step (the current "cp -r
artifacts/app/* /app/lib/deepink") to either copy the contents of the archive
root into /app/lib/deepink (detect and strip the single top-level directory) or
adjust the chmod/install source paths to include that top-level folder; ensure
deepink binary (deepink) and resources/assets/icons/app.png are referenced
correctly after flattening, and keep deepink.sh installation unchanged.
---
Nitpick comments:
In `@packages/app/scripts/flathub/Makefile`:
- Around line 9-14: Add a .PHONY declaration for the Makefile targets to mark
them as phony; specifically add a line declaring ".PHONY: install clean" near
the top of the Makefile so the "install" and "clean" targets (used by
flatpak-builder and rm -rf) are always executed regardless of files or
directories named "install" or "clean".
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 19caaad8-cde4-401c-8c8d-f837eb3a4b38
📒 Files selected for processing (4)
packages/app/scripts/flathub/.gitignorepackages/app/scripts/flathub/Makefilepackages/app/scripts/flathub/app.deepink.Deepink.yamlpackages/site/public/.well-known/org.flathub.VerifiedApps.txt
✅ Files skipped from review due to trivial changes (1)
- packages/app/scripts/flathub/.gitignore
Cloudflare Pages DeploymentEvent Name: pull_request Wrangler Output⛅️ wrangler 4.87.0 🌎 Deploying... |
Cloudflare Pages DeploymentEvent Name: pull_request Wrangler Output⛅️ wrangler 4.87.0 🌎 Deploying... |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/app/scripts/flathub/Makefile`:
- Around line 14-15: The clean target in the Makefile currently removes
${BUILD_DIR} and ${REPO_DIR} but omits the deepink.flatpak artifact created by
the deepink.flatpak target; update the clean target to also remove
deepink.flatpak (e.g., include ./deepink.flatpak in the rm -rf invocation
alongside ./${BUILD_DIR} and ./${REPO_DIR}) so all three ignored build artifacts
are cleaned consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 42fd90bf-8bd4-4419-8b50-d57abd8d9e0c
📒 Files selected for processing (1)
packages/app/scripts/flathub/Makefile
Closes #284
Summary by CodeRabbit