| 1 | |
| 2 | = port bump = |
| 3 | |
| 4 | == Description |
| 5 | |
| 6 | As requested in a [[https://trac.macports.org/ticket/53851|ticket]], port bump has been implemented in GSoC 2019 as a sub-goal of the [[https://trac.macports.org/wiki/SummerOfCode/2019#remove-xcode-dep|Xcode project]]. |
| 7 | |
| 8 | The [[https://github.com/macports/macports-base/pull/120|first PR]] discusses how it is implemented as a target (along with install, fetch, extract, etc.) in `macports-base`. |
| 9 | |
| 10 | == What's been done |
| 11 | |
| 12 | **Basic functionality** |
| 13 | |
| 14 | `port bump` updates the checksums of a Portfile if they are outdated or different than the current version's checksums. Additionally, the revision number will be reset. |
| 15 | |
| 16 | **--patch argument** |
| 17 | |
| 18 | `port bump --patch` creates a Portfile.patch file instead of directly overwriting the Portfile. |
| 19 | |
| 20 | == What hasn't been done |
| 21 | |
| 22 | **@version/--livecheck argument** |
| 23 | |
| 24 | Ideally, the port maintainer doesn't have to manually update the Portfile's version first before running `port bump`, instead with simply running `port bump @version`, MacPorts will change the version by itself. |
| 25 | To implement this, something has to be changed on or before the `fetch` phase as (right now) it will download the version that is in the Portfile. An idea would be to modify replace what the port version is memory before running fetch, or do something like manually run `portfetch::fetch_main` in `portbump.tcl` with modifications instead of requiring the fetch phase (`target_requires ${org.macports.bump} fetch`). |
| 26 | |
| 27 | This idea can be discussed further with the people from the PR or the Xcode project. |