diff options
author | Paul Spooren <mail@aparcar.org> | 2021-01-01 14:02:12 -1000 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-01-22 19:03:53 -1000 |
commit | 9ae3c6f94c616cfbf854d3ec749c7fafc9893942 (patch) | |
tree | faafaf0f216be79781c2e11fff66734e4395607c /target/imagebuilder | |
parent | e779d30f32836a89fc8e5997edc9a5444283ae15 (diff) | |
download | upstream-9ae3c6f94c616cfbf854d3ec749c7fafc9893942.tar.gz upstream-9ae3c6f94c616cfbf854d3ec749c7fafc9893942.tar.bz2 upstream-9ae3c6f94c616cfbf854d3ec749c7fafc9893942.zip |
rules: add AUTORELEASE and COMMITCOUNT variables
The lack of bumped PKG_RELEASE variables is a recurring theme on the
mailing list and in GitHub comments. This costs precious review time,
a rare good within the OpenWrt project.
Instead of relying on a manually set PKG_RELEASE this commit adds a
`commitcount` function that uses the number of Git commits to determine
the release. The function is called via the variables `$(AUTORELEASE)`
or `$(COMMITCOUNT)`. The `PKG_RELEASE` variable can be set to either of
the two.
- $(AUTORELEASE):
Release is automagically set to the number of commits since the last
commit containing either ": update to " or ": bump to ".
Example below:
$ git log packages/foobar/
foobar: fixup file location
foobar: disable docs
foobar: bump to 5.3.2
foobar: fixup copyright
Resulting package name: foobar_5.3.2-3_all.ipk, two package changes
since the last upstream version change, using a 1 based counter.
- $(COMMITCOUNT):
For non-traditional versioning (x.y.z), most prominent `base-files`,
this variable contains the total number of package commits.
The new functionality can also be used by other feeds like packages.git.
In case no build information is available, e.g. when using release
tarballs, the SOURCE_DATE_EPOCH is used to have a reproducible release
identifier.
Suggested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'target/imagebuilder')
0 files changed, 0 insertions, 0 deletions