From a158ef25e0f1c2c0ac3273116993bdd80cd19c96 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 1 Oct 2016 15:33:30 +0100 Subject: Migrate a Formula to Multiple Versions: add docs. Add a document describing how to migrate a formula to our new multiple versions support, upgrade a multiple version formula and how to import a homebrew/versions formula into homebrew/core. --- docs/Migrate-A-Formula-To-Multiple-Versions.md | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/Migrate-A-Formula-To-Multiple-Versions.md (limited to 'docs') diff --git a/docs/Migrate-A-Formula-To-Multiple-Versions.md b/docs/Migrate-A-Formula-To-Multiple-Versions.md new file mode 100644 index 000000000..f1515123a --- /dev/null +++ b/docs/Migrate-A-Formula-To-Multiple-Versions.md @@ -0,0 +1,27 @@ +# Migrate a Formula to Multiple Versions +## Migrating an existing formula to multiple versions + +In separate pull-requests: + +1. [Rename the formula](Rename-A-Formula.md) from e.g. `boost.rb` to e.g. `boost@1.61.rb` and, in the same pull request, add an alias named `boost`. This should not require any `revision`ing or significant formula modification beyond the formula name. +2. Add the new version formula e.g. `boost@1.62.rb` +3. Tap authors should have their `depends_on "boost"` updated to `depends_on "boost@1.61"` or `depends_on "boost@1.62"`. +4. Modify the `boost` alias to point to `boost@1.62.rb`. Any formulae that need the old version of `boost` should have their `depends_on "boost"` to be updated to `depends_on "boost@1.61"`. +5. When `boost@1.62` has two major/minor versions newer than it (e.g. `boost@1.64`) then consider removing `boost@1.62.rb` and anything that depends on it. + +## Upgrading a multiple version formula + +In separate pull-requests: + +1. Add the new version formula e.g. `boost@1.63.rb` +2. Modify the `boost` alias to point to `boost@1.63.rb`. Any formulae that need the old version of `boost` should have their `depends_on "boost"` to be updated to `depends_on "boost@1.62"`. +3. When `boost@1.63` has two major/minor versions newer than it (e.g. `boost@1.65`) then consider removing `boost@1.63.rb` and anything that depends on it. + +## Importing a homebrew/versions formula into homebrew/core + +In separate pull-requests: + +1. [Migrate the formula](Migrating-A-Formula-To-A-Tap) from Homebrew/homebrew-versions to Homebrew/homebrew-core with the same, old name e.g. `boost160.rb`. +2. [Rename the formula](Rename-A-Formula.md) from e.g. `boost160.rb` to e.g. `boost@1.60.rb`. This should not require any `revision`ing or significant formula modification beyond the formula name. +3. Tap authors should have their `depends_on "boost160"` updated to `depends_on "boost@1.60"`. +5. When `boost@1.60` has two major/minor versions newer than it (e.g. `boost@1.62`) then consider removing `boost@1.60.rb` and anything that depends on it. -- cgit v1.2.3 From d2cc9179601103dcb23606eb39dffb7e1e80023c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 1 Oct 2016 16:41:46 +0100 Subject: Fix migrate formula link. --- docs/Migrate-A-Formula-To-Multiple-Versions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/Migrate-A-Formula-To-Multiple-Versions.md b/docs/Migrate-A-Formula-To-Multiple-Versions.md index f1515123a..6fdf8a7d2 100644 --- a/docs/Migrate-A-Formula-To-Multiple-Versions.md +++ b/docs/Migrate-A-Formula-To-Multiple-Versions.md @@ -21,7 +21,7 @@ In separate pull-requests: In separate pull-requests: -1. [Migrate the formula](Migrating-A-Formula-To-A-Tap) from Homebrew/homebrew-versions to Homebrew/homebrew-core with the same, old name e.g. `boost160.rb`. +1. [Migrate the formula](Migrating-A-Formula-To-A-Tap.md) from Homebrew/homebrew-versions to Homebrew/homebrew-core with the same, old name e.g. `boost160.rb`. 2. [Rename the formula](Rename-A-Formula.md) from e.g. `boost160.rb` to e.g. `boost@1.60.rb`. This should not require any `revision`ing or significant formula modification beyond the formula name. 3. Tap authors should have their `depends_on "boost160"` updated to `depends_on "boost@1.60"`. 5. When `boost@1.60` has two major/minor versions newer than it (e.g. `boost@1.62`) then consider removing `boost@1.60.rb` and anything that depends on it. -- cgit v1.2.3 From c3771336cff5630ce09248a57728e67393008087 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 1 Oct 2016 16:41:59 +0100 Subject: Note keg_only changes. --- docs/Migrate-A-Formula-To-Multiple-Versions.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/Migrate-A-Formula-To-Multiple-Versions.md b/docs/Migrate-A-Formula-To-Multiple-Versions.md index 6fdf8a7d2..cd69790b0 100644 --- a/docs/Migrate-A-Formula-To-Multiple-Versions.md +++ b/docs/Migrate-A-Formula-To-Multiple-Versions.md @@ -4,24 +4,24 @@ In separate pull-requests: 1. [Rename the formula](Rename-A-Formula.md) from e.g. `boost.rb` to e.g. `boost@1.61.rb` and, in the same pull request, add an alias named `boost`. This should not require any `revision`ing or significant formula modification beyond the formula name. -2. Add the new version formula e.g. `boost@1.62.rb` +2. Add the new `keg_only` version formula e.g. `boost@1.62.rb` 3. Tap authors should have their `depends_on "boost"` updated to `depends_on "boost@1.61"` or `depends_on "boost@1.62"`. -4. Modify the `boost` alias to point to `boost@1.62.rb`. Any formulae that need the old version of `boost` should have their `depends_on "boost"` to be updated to `depends_on "boost@1.61"`. +4. Modify the `boost` alias to point to `boost@1.62.rb`. Any formulae that need the old version of `boost` should have their `depends_on "boost"` to be updated to `depends_on "boost@1.61"`. `boost@1.62.rb` should no longer be `keg_only` and `boost@1.61.rb` should become `keg_only`. 5. When `boost@1.62` has two major/minor versions newer than it (e.g. `boost@1.64`) then consider removing `boost@1.62.rb` and anything that depends on it. ## Upgrading a multiple version formula In separate pull-requests: -1. Add the new version formula e.g. `boost@1.63.rb` -2. Modify the `boost` alias to point to `boost@1.63.rb`. Any formulae that need the old version of `boost` should have their `depends_on "boost"` to be updated to `depends_on "boost@1.62"`. +1. Add the new `keg_only` version formula e.g. `boost@1.63.rb` +2. Modify the `boost` alias to point to `boost@1.63.rb`. Any formulae that need the old version of `boost` should have their `depends_on "boost"` to be updated to `depends_on "boost@1.62"`. `boost@1.63.rb` should no longer be `keg_only` and `boost@1.62.rb` should become `keg_only`. 3. When `boost@1.63` has two major/minor versions newer than it (e.g. `boost@1.65`) then consider removing `boost@1.63.rb` and anything that depends on it. ## Importing a homebrew/versions formula into homebrew/core In separate pull-requests: -1. [Migrate the formula](Migrating-A-Formula-To-A-Tap.md) from Homebrew/homebrew-versions to Homebrew/homebrew-core with the same, old name e.g. `boost160.rb`. +1. [Migrate the formula](Migrating-A-Formula-To-A-Tap.md) from Homebrew/homebrew-versions to Homebrew/homebrew-core with the same, old name e.g. `boost160.rb` and to be `keg_only`. 2. [Rename the formula](Rename-A-Formula.md) from e.g. `boost160.rb` to e.g. `boost@1.60.rb`. This should not require any `revision`ing or significant formula modification beyond the formula name. 3. Tap authors should have their `depends_on "boost160"` updated to `depends_on "boost@1.60"`. 5. When `boost@1.60` has two major/minor versions newer than it (e.g. `boost@1.62`) then consider removing `boost@1.60.rb` and anything that depends on it. -- cgit v1.2.3