Repository navigation
ci: Rebase the fork onto upstream kDrive and build it automatically - #1
Conversation
f6a7264 to
d5eb517
Compare
|
Nothing in this PR can fix it. The translations are upstream's, so patching them here would only add conflicts on every sync. The fix is setup step 2 in
Generated by Claude Code |
d5eb517 to
f9d4e66
Compare
The Fork sync workflow runs daily, on pushes to main and on demand. It rebases the fork's own commits onto the latest upstream kDrive release, builds a signed release APK, and only then force-pushes main and publishes a GitHub release. A rebase conflict or failed build leaves main untouched and opens an issue with the commands to fix it locally. Pull requests to main are built without being pushed or released. .github/fork-sync/sync.sh does the rebase and can be run locally too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQpS1fDBQzXvMNRrdX4qgM
f9d4e66 to
d44cafc
Compare
A PR build failed in :app:packageStandardRelease with only Gradle's generic "A failure occurred while executing IncrementalSplitterRunnable", while the identical code built fine one run earlier. Run Gradle with --stacktrace so the underlying exception is printed, and report disk, memory and recent kernel messages after a failed build, so the next occurrence shows whether the runner ran out of space or memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQpS1fDBQzXvMNRrdX4qgM
Adds a Fork sync workflow that keeps this fork's commits on top of Infomaniak's latest kDrive release and builds an APK.
What it does
On
main(daily at 05:17 UTC, on every push, or on demand from the Actions tab):.github/fork-sync/sync.shrebases the fork's own commits onto the latest upstream release tag (currently5.22.1). It usesgit rebase --onto <tag> <merge-base>, so only the fork's commits are replayed, and merge commits (PR merges, "Sync fork" merges) are dropped.standardrelease APK and signs it with the fork's key.main(with--force-with-lease) and publishes a GitHub release with the APK and the list of fork commits.If a commit doesn't rebase cleanly, or the rebased code doesn't build,
mainis left untouched and an issue labelledfork-syncis opened and assigned to the repo owner, with the exact commands to fix it locally. The next run that buildsmainsuccessfully closes it. A failure that is already reported doesn't add a comment each day.On pull requests to
main, the workflow only builds and attaches the APK to the run as an artifact.Files
.github/workflows/fork-sync.yml: the workflow..github/fork-sync/sync.sh: the rebase. CI runs it withABORT_ON_CONFLICT=1. Run locally, it stops at a conflict so you can resolve it..github/fork-sync/report.sh: opens, updates and closes the issue..github/fork-sync/skip-sentry-upload.init.gradle: Gradle init script that skips the release build's uploads to Infomaniak's Sentry, which this fork has no credentials for. The build files themselves aren't touched..github/fork-sync/README.md: setup instructions.Everything lives in new files, so none of this can conflict with upstream.
mainwas rebased onto 5.22.1 firstmainhas already been rebased onto upstream5.22.1, so the first sync after merging has nothing to rebase and goes straight to building and releasing. This PR now sits on top of thatmain.The quick-delete commit conflicted in
FileInfoActionsView.kt, because upstream changed the delete-visibility rule (shared files you created can now be deleted). The resolution keeps upstream's rule and uses it for both the menu action and the quick-delete button:The old
mainwasd9b311b.Setup needed before merging
See
.github/fork-sync/README.md. In short:SYNC_TOKENsecret: a fine-grained token with Contents and Workflows read/write. The built-in token can't push the rebasedmain, because upstream changes workflow files.SIGNING_*secrets for signed releases.Testing
sync.sh, run against the real upstream in a scratch clone:5.22.1is clean.mainworks, as do history with a PR merge commit and history with an upstream merge.main): it reported the quick-delete commit and the conflicting file, and left the branch unchanged in CI mode. Run locally, it stopped at the conflict for resolution; that's howmainwas rebased.report.shwas run against a stubbedgh: new issue, duplicate suppressed, retitled with a comment, and closed on success.actionlintpasses with shellcheck integration, andshellcheckreports no warnings on the scripts.d5eb517) passed. It produced a release APK in about 11 minutes, with the Sentry upload and bundle tasks shown asSKIPPEDand an unsigned APK artifact, since no signing secrets are set. The run on the current head compiles the rebased5.22.1code.🤖 Generated with Claude Code
https://claude.ai/code/session_01SQpS1fDBQzXvMNRrdX4qgM