← index #12127PR #12581
Duplicate · high · value 1.146
QUERY · ISSUE

RFC: Version nightly builds by the next release rather than previous.

openby jimmoopened 2023-07-31updated 2023-10-04
enhancement

Currently the nightly/unstable builds are named <board id>-<date>-unstable-<last release>-<commits since last release>-g<git hash>. e.g. pybv11-20230727-unstable-v1.20.0-327-gd14ddcbdb.dfu

(Compare to release builds, e.g. pybv11-20230426-v1.20.0.dfu)

I would argue that the nightlies have more in common with the next release than they do with the current release (especially later in the release cycle).

Should we consider changing the release in the unstable filename to be the name of the next release. This would mean that we change py/mpconfig.h etc immediately to the next version after git tagging a release.

Inspired by https://github.com/micropython/micropython/issues/12108#event-9946421711

CANDIDATE · PULL REQUEST

all: Switch to new versioning scheme described in #12127.

mergedby jimmoopened 2023-10-04updated 2023-10-06
py-core

See #12127 for more background.


Previously at the point when a release is made, we update mpconfig.h and set a git tag. i.e. the version increments at the release.

Now the version increments immediately after the release. The workflow is:

  1. Final commit in the cycle updates mpconfig.h to set (X, Y, 0, 0) (i.e. clear the pre-release state).
  2. This commit is tagged "vX.Y.0".
  3. First commit for the new cycle updates mpconfig.h to set (X, Y+1, 0, 1) (i.e. increment the minor version, set the pre-release state).
  4. This commit is tagged "vX.Y+1.0-preview".

The idea is that a nightly build is actually a "preview" of the next release. i.e. any documentation describing the current release may not actually match the nightly build. So we use "preview" as our semver pre-release identifier.

Changes in this commit:

  • Add MICROPY_VERSION_PRERELEASE to mpconfig.h to allow indicating that this is not a release version.
  • Remove unused MICROPY_VERSION integer.
  • Append "-preview" to MICROPY_VERSION_STRING when the pre-release state is set.
  • Update py/makeversionhdr.py to no longer generate MICROPY_GIT_HASH.
  • Remove the one place MICROPY_GIT_HASH was used (it can use MICROPY_GIT_TAG instead).
  • Update py/makeversionhdr.py to also understand MICROPY_VERSION_PRERELEASE in mpconfig.h.
  • Update py/makeversionhdr.py to convert the git-describe output into semver-compatible "X.Y.Z-preview.N.gHASH".
  • Update autobuild.sh to generate filenames using the new scheme.
  • Update mpremote's pyproject.toml to handle the "-preview" suffix in the tag. setuptools_scm maps to this "rc0" to match PEP440.

This work was funded through GitHub Sponsors.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied