diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1f6532bb..19938c04 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -19,6 +19,6 @@ ### :thinking: Checklist before submitting - [ ] All projects build -- [ ] Follows style guide lines ([code style guide](https://github.com/Baseflow/flutter_cache_manager/blob/develop/CONTRIBUTING.md)) +- [ ] Follows style guide lines ([code style guide](https://github.com/Baseflow/flutter_cache_manager/blob/main/CONTRIBUTING.md)) - [ ] Relevant documentation was updated -- [ ] Rebased onto current develop +- [ ] Rebased onto current main diff --git a/.github/workflows/build-firebase.yaml b/.github/workflows/build-firebase.yaml index 2dccd77c..83b612c1 100644 --- a/.github/workflows/build-firebase.yaml +++ b/.github/workflows/build-firebase.yaml @@ -6,12 +6,12 @@ on: push: tags: - "firebase-v[0-9]+.[0-9]+.[0-9]+*" - branches: [develop, main] + branches: [main] paths: - "flutter_cache_manager_firebase/**" - ".github/workflows/build-firebase.yaml" pull_request: - branches: [develop, main] + branches: [main] paths: - "flutter_cache_manager_firebase/**" - ".github/workflows/build-firebase.yaml" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2e20aca9..41ffd053 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,12 +6,12 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+*" - branches: [develop, main] + branches: [main] paths: - "flutter_cache_manager/**" - ".github/workflows/build.yaml" pull_request: - branches: [develop, main] + branches: [main] paths: - "flutter_cache_manager/**" - ".github/workflows/build.yaml" diff --git a/AGENTS.md b/AGENTS.md index 337546a5..74900a91 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -102,11 +102,11 @@ Per [CONTRIBUTING.md](CONTRIBUTING.md) and Baseflow's open-source forking workfl git remote add upstream git@github.com:Baseflow/flutter_cache_manager.git ``` -4. Branch from latest `develop`: +4. Branch from latest `main`: ```bash git fetch upstream -git checkout upstream/develop -b +git checkout upstream/main -b ``` Expected remotes after setup: @@ -163,9 +163,15 @@ Prefer `MemoryFileSystem` / mocks over real disk or network in unit tests. When ## Pull request workflow +**Hard requirement — `main` is the only long-lived branch.** Branch from `upstream/main`, open +every PR against `main`, and rebase onto `main`. There is no `develop` branch: do not create one, +do not target one, and do not reintroduce a two-branch (`develop` → `main`) flow. A repository +ruleset blocks creation of any branch named `develop`, so attempts to push one will be rejected. +PRs land as squash merges, so each PR becomes a single commit on `main`. + This repo uses the **forking workflow**: contributors work on their own fork and open PRs to the main repository. Maintainers review and merge — do not push directly to `Baseflow/flutter_cache_manager`. -1. Apply changes on a branch based on `upstream/develop`. +1. Apply changes on a branch based on `upstream/main`. 2. Verify locally (from the changed package): - `dart format .` - `flutter analyze` @@ -199,8 +205,28 @@ Fill out the [PR template](.github/PULL_REQUEST_TEMPLATE.md), but keep each sect - [ ] This PR only changes one package (or documents why an exception is needed) - [ ] `CHANGELOG.md` updated under `## [Unreleased]` in the changed package, following the [Flutter changelog style](https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style) — no version heading until maintainers cut a release - [ ] Public API documented with `///` doc comments where applicable -- [ ] Rebased onto `develop` +- [ ] Rebased onto `main` - [ ] New tests added where applicable; all tests pass - [ ] `dart format .` and `flutter analyze` pass with no errors, no warnings left unfixed - [ ] Relevant README / docs updated for user-facing changes - [ ] Full [PR template](.github/PULL_REQUEST_TEMPLATE.md) filled in + +## Releases + +Each package is versioned and released independently. Only maintainers cut releases. + +1. Open a release PR against `main` for **one package**: move that package's `## [Unreleased]` + CHANGELOG entries under a new dated `## [x.y.z] - YYYY-MM-DD` heading (leaving `[Unreleased]` + empty at the top) and bump `version:` in its `pubspec.yaml`. +2. Verify from that package directory: `dart format --set-exit-if-changed .`, `flutter analyze`, + `flutter test`, and `dart pub publish --dry-run`. +3. Merge once CI is green, then tag the resulting commit on `main`: + - `flutter_cache_manager` → `vX.Y.Z` + - `flutter_cache_manager_firebase` → `firebase-vX.Y.Z` +4. Push the tag. **Pushing the tag is what publishes**: `build.yaml` / `build-firebase.yaml` run + `dart pub publish` via pub.dev OIDC trusted publishing, gated on `github.ref_type == 'tag'`. + Never run `dart pub publish` by hand, and never bump a version without a tag to match. + +The workflows publish whatever is committed at the tagged commit — they do not bump versions or +edit changelogs. Keep branch names out of URLs in `pubspec.yaml` and docs; published versions are +immutable, so a branch-specific link becomes a permanent dead link once that branch is gone. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6effc6f4..f120cbe6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,9 +26,9 @@ to generate an SSH key. We really appreciate contributions via GitHub pull requests. To contribute take the following steps: -- Make sure you are up to date with the latest code on develop: +- Make sure you are up to date with the latest code on main: - `git fetch upstream` - - `git checkout upstream/develop -b ` + - `git checkout upstream/main -b ` - Apply your changes - Verify your changes and fix potential warnings/ errors (run from the package you changed): - Check formatting: `dart format .` diff --git a/flutter_cache_manager/CHANGELOG.md b/flutter_cache_manager/CHANGELOG.md index ba4dba8a..5bca3291 100644 --- a/flutter_cache_manager/CHANGELOG.md +++ b/flutter_cache_manager/CHANGELOG.md @@ -10,6 +10,7 @@ * Pins example `path_provider_android` to 2.2.22 to avoid transitive `jni` / `jni_flutter` AGP 9 issues * Adds a root `CLAUDE.md` that imports `AGENTS.md` and holds Claude Code-specific contributor notes * Publishes `AGENTS.md` (previously git-ignored) and trims it to technical content: architecture, directory map, fork workflow, commands, testing, and PR checklist +* Points `homepage` at the repository root instead of a branch-specific URL ## [3.4.2] - 2026-07-21 diff --git a/flutter_cache_manager/README.md b/flutter_cache_manager/README.md index 3c5b77e4..d0e2df3e 100644 --- a/flutter_cache_manager/README.md +++ b/flutter_cache_manager/README.md @@ -7,7 +7,7 @@ CacheManager v2 introduced some breaking changes when configuring a custom Cache [![pub package](https://img.shields.io/pub/v/flutter_cache_manager.svg)](https://pub.dartlang.org/packages/flutter_cache_manager) [![build](https://github.com/Baseflow/flutter_cache_manager/actions/workflows/build.yaml/badge.svg)](https://github.com/Baseflow/flutter_cache_manager/actions/workflows/build.yaml) -[![codecov](https://codecov.io/gh/Baseflow/flutter_cache_manager/branch/master/graph/badge.svg)](https://codecov.io/gh/Baseflow/flutter_cache_manager) +[![codecov](https://codecov.io/gh/Baseflow/flutter_cache_manager/branch/main/graph/badge.svg)](https://codecov.io/gh/Baseflow/flutter_cache_manager) A CacheManager to download and cache files in the cache directory of the app. Various settings on how long to keep a file can be changed. diff --git a/flutter_cache_manager/pubspec.yaml b/flutter_cache_manager/pubspec.yaml index 988e83e2..d56f6afa 100644 --- a/flutter_cache_manager/pubspec.yaml +++ b/flutter_cache_manager/pubspec.yaml @@ -1,7 +1,7 @@ name: flutter_cache_manager description: Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite. version: 3.4.3 -homepage: https://github.com/Baseflow/flutter_cache_manager/tree/develop/flutter_cache_manager +homepage: https://github.com/Baseflow/flutter_cache_manager topics: - cache - cache-manager