|
1 | 1 | # Releasing |
2 | 2 |
|
3 | | -This repo has two release mechanisms. The **current** one is in-repo and manual/scripted; the **prototype** one is CI-published. This document compares them so we can decide whether to migrate. |
| 3 | +Releases are built in CI and published to GitHub Pages as a p2 composite repository. The older in-repo committed update site is **legacy** and is being retired. |
4 | 4 |
|
5 | | -## Current Model (`release.sh`, Committed Update Site) |
| 5 | +## How to Cut a Release |
6 | 6 |
|
7 | | -The P2 update site lives **inside the source repo** (`edu.cuny.citytech.refactoring.common.updatesite/`) and is **cumulative**: every release commits its feature + plugin jars and rewrites the shared `artifacts.jar`/`content.jar` index, served from `raw.githubusercontent.com/.../updatesite`. |
| 7 | +Run the **Release** workflow: GitHub → Actions → "Release (CI-published p2 site)" → Run workflow, and enter the release version (e.g. `5.4.0`). It will set the version, build and test, tag `vX.Y.Z`, create a GitHub Release (with the p2 repo attached as a zip), publish the per-version repo to `gh-pages`, regenerate the composite index, and bump `master` to the next development version. No binaries are committed to `master`. |
8 | 8 |
|
9 | | -`./release.sh X.Y.Z` automates it: `set-version`→build→stage jars→bump `site.xml`→regenerate the cumulative index with the Eclipse p2 publisher (`-append`)→commit/tag/push→GitHub Release→next-dev bump. |
| 9 | +Update-site URL (composite, exposes every released version): |
10 | 10 |
|
11 | | -Trade-offs: |
| 11 | +``` |
| 12 | +https://ponder-lab.github.io/Common-Eclipse-Refactoring-Framework/releases/ |
| 13 | +``` |
12 | 14 |
|
13 | | -- ➖ Binaries accumulate in `master` history **forever**—every release grows every clone, unrecoverably. |
14 | | -- ➖ Requires a local Eclipse install with the p2 publisher apps; the index is hand-assembled (`-append`), which is fragile (category-id qualification, easy to leak a local path). |
15 | | -- ➖ `raw.githubusercontent.com` is not a real artifact host (no CDN/SLA). |
16 | | -- ➕ Zero infra; everything is in one repo; offline-capable. |
| 15 | +## How It Works (CI→GitHub Pages Composite Repo) |
17 | 16 |
|
18 | | -## Prototype Model (This Branch: CI→GitHub Pages Composite Repo) |
| 17 | +The update site is built in CI and published to the `gh-pages` branch, never committed to `master`. Each release publishes its **own** small p2 repo under `releases/X.Y.Z/`, and a p2 **composite repository** at the root ties them all together—so one stable URL exposes every version without a monolithic index. |
19 | 18 |
|
20 | | -The update site is **built in CI and published to the `gh-pages` branch**, never committed to `master`. Each release publishes its **own** small p2 repo under `releases/X.Y.Z/`, and a p2 **composite repository** at the root ties them all together—so one stable URL exposes every version without a monolithic index. |
| 19 | +Pieces: |
21 | 20 |
|
22 | | -Stable update-site URL (composite): |
| 21 | +- **`edu.cuny.citytech.refactoring.common.updatesite/category.xml`**—makes Tycho's `eclipse-repository` build produce a **complete** per-version p2 repo at `updatesite/target/repository` (feature + 8 bundles + category); a plain `./mvnw clean install` is enough (no GUI, no p2 publisher, no `-append`). |
| 22 | +- **`tools/p2-composite.sh`**—regenerates `compositeContent.xml`/`compositeArtifacts.xml` from the per-version child dirs. |
| 23 | +- **`.github/workflows/release.yml`**—the manual-dispatch pipeline described above. |
23 | 24 |
|
24 | | -``` |
25 | | -https://ponder-lab.github.io/Common-Eclipse-Refactoring-Framework/releases/ |
26 | | -``` |
| 25 | +Properties: |
27 | 26 |
|
28 | | -Pieces added on this branch: |
| 27 | +- No binaries in `master`—source history stays lean. The published bits live on the orphan `gh-pages` branch, independent of source clones. |
| 28 | +- One CLI build produces the repo; no GUI, no hand-assembled index. |
| 29 | +- The composite layout scales to any number of versions; each release is an isolated, immutable child. |
| 30 | +- The shipped repo always matches what the build compiled against (no dep-vs-site drift). |
29 | 31 |
|
30 | | -- **`edu.cuny.citytech.refactoring.common.updatesite/category.xml`**—the key fix. Tycho's `eclipse-repository` build was producing an *empty* repo because the module only had the legacy `site.xml`. With a `category.xml`, a plain `./mvnw clean install` produces a **complete** per-version p2 repo at `updatesite/target/repository` (feature + 8 bundles + category)—no GUI, no p2 publisher, no `-append`. |
31 | | -- **`tools/p2-composite.sh`**—regenerates `compositeContent.xml`/`compositeArtifacts.xml` from the per-version child dirs. (Verified: the Eclipse p2 director loads the composite and resolves the feature.) |
32 | | -- **`.github/workflows/release.yml`**—manual-dispatch pipeline: set-version→build/test→tag + GitHub Release (with the p2 repo zipped as an asset)→publish to `gh-pages` as a composite→next-dev bump. |
| 32 | +## Legacy Model (`release.sh`, Committed Update Site) |
33 | 33 |
|
34 | | -Trade-offs: |
| 34 | +Before the CI flow, the p2 update site lived **inside the source repo** (`edu.cuny.citytech.refactoring.common.updatesite/`) and was **cumulative**: every release committed its feature + plugin jars and rewrote the shared `artifacts.jar`/`content.jar` index, served from `raw.githubusercontent.com/.../updatesite`. `./release.sh X.Y.Z` automated that flow. |
35 | 35 |
|
36 | | -- ➕ **No binaries in `master`**—source history stays lean. The published bits live on the orphan `gh-pages` branch, independent of source clones. |
37 | | -- ➕ One CLI build produces the repo; no GUI, no hand-assembled index. |
38 | | -- ➕ Composite layout scales to any number of versions; each release is an isolated, immutable child—no risk of corrupting a shared index. |
39 | | -- ➕ Released p2 repo is also attached to the GitHub Release as a zip. |
40 | | -- ➖ Relies on GitHub Pages + Actions (infra, perms). |
41 | | -- ➖ `gh-pages` still accumulates binaries, but on a branch you can prune/squash without touching source history. |
| 36 | +It is retained only as an offline fallback. Drawbacks that motivated the move: binaries accumulate in `master` history forever (every release grows every clone); it needs a local Eclipse install with the p2 publisher and a fragile hand-assembled (`-append`) index; and `raw.githubusercontent.com` is not a real artifact host. |
42 | 37 |
|
43 | | -## Migration Notes (Not Done on This Branch) |
| 38 | +## Remaining Cleanup |
44 | 39 |
|
45 | | -1. Enable GitHub Pages for the `gh-pages` branch. |
46 | | -2. Update the README's update-site URL to the Pages composite URL. |
47 | | -3. Optionally seed `gh-pages` with the existing historical versions (one child dir per past release) so nothing 404s, then **drop the committed `updatesite/` binaries** from `master` going forward (and, if desired, purge them from history). |
48 | | -4. Retire `release.sh` (or keep as an offline fallback). |
| 40 | +1. Drop the committed `updatesite/` binaries from `master` (history is preserved on `gh-pages` under `releases/archive/`). |
| 41 | +2. Retire `release.sh` (or keep as an offline fallback). |
| 42 | +3. Once confident, remove the legacy `raw.githubusercontent` URL from the README. |
0 commit comments