|
| 1 | +# https://github.com/influxdata/ci-support/blob/main/ci-packager-next/fs/usr/bin/packager |
| 2 | +# uses this to calculate the version used for tarball, zip and Linux package |
| 3 | +# versions and git tags for this repo (https://github.com/influxdata/influxdb) |
| 4 | +# are used by .circleci/config.yml's 'release_filter' to determine which CI |
| 5 | +# jobs to run. Be default, packager will set the version to |
| 6 | +# 3.0.0+snapshot-<git sha> based on CIRCLE_SHA1. If CIRCLE_TAG matches one of |
| 7 | +# these, then packager will set the version based on the tag: |
| 8 | +# |
| 9 | +# | tag | filename | deb | rpm | |
| 10 | +# |--------------------|-------------------|-------------------| -------------------------- | |
| 11 | +# | v3.0.0-0.alpha.1 | 3.0.0-0.alpha.1 | 3.0.0-0.alpha.1 | ver=3.0.0, rel=0.alpha.1 | |
| 12 | +# | v3.0.0-0.alpha.1.1 | 3.0.0-0.alpha.1.1 | 3.0.0-0.alpha.1.1 | ver=3.0.0, rel=0.alpha.1.1 | |
| 13 | +# | v3.0.0-0.alpha.2 | 3.0.0-0.alpha.2 | 3.0.0-0.alpha.2 | ver=3.0.0, rel=0.alpha.2 | |
| 14 | +# | v3.0.0-0.beta.1 | 3.0.0-0.beta.1 | 3.0.0-0.beta.1 | ver=3.0.0, rel=0.beta.1 | |
| 15 | +# | v3.0.0-0.beta.1.1 | 3.0.0-0.beta.1.1 | 3.0.0-0.beta.1.1 | ver=3.0.0, rel=0.beta.1.1 | |
| 16 | +# | v3.0.0-0.beta.2 | 3.0.0-0.beta.2 | 3.0.0-0.beta.2 | ver=3.0.0, rel=0.beta.2 | |
| 17 | +# | v3.0.0-0.rc.1 | 3.0.0-0.rc.1 | 3.0.0-0.rc.1 | ver=3.0.0, rel=0.rc.1 | |
| 18 | +# | v3.0.0 | 3.0.0 | 3.0.0-1 | ver=3.0.0, rel=1 | |
| 19 | +# | v3.0.0-2 | 3.0.0-2 | 3.0.0-2 | ver=3.0.0, rel=2 | |
| 20 | +# |
| 21 | +# In this manner: |
| 22 | +# - v3.0.0-0.alpha.1 < v3.0.0-0.alpha.1.1 |
| 23 | +# - v3.0.0-0.alpha.1.1 < v3.0.0-0.alpha.2 |
| 24 | +# - v3.0.0-0.alpha.2 < v3.0.0-0.beta.1 |
| 25 | +# - v3.0.0-0.beta.1 < v3.0.0-0.beta.1.1 |
| 26 | +# - v3.0.0-0.beta.1.1 < v3.0.0-0.beta.2 |
| 27 | +# - v3.0.0-0.beta.2 < v3.0.0-0.rc.1 |
| 28 | +# - v3.0.0-0.rc.1 < v3.0.0 |
| 29 | +# - v3.0.0 < v3.0.0-2 |
| 30 | +# |
| 31 | +# (use 'dpkg --compare-versions X lt Y && echo yes' for debs and |
| 32 | +# 'rpmdev-vercmp X Y | grep " < " && echo yes' for rpms) |
| 33 | +# |
| 34 | +# We use the following tag schema that supports semver as well as Linux package |
| 35 | +# version semantics (see https://github.com/influxdata/influxdb/pull/24751 for |
| 36 | +# context): |
| 37 | +# |
| 38 | +# v3.M.m[-B[.Q.q.b]] # eg, v3.0.0, v3.0.0-2, v3.0.0-0.beta.1 or v3.0.0-0.beta.1.1 |
| 39 | +# | | | | | | | |
| 40 | +# | | | | | | ----------> quality release package build number |
| 41 | +# | | | | | ------------> quality release number |
| 42 | +# | | | | --------------> release quality |
| 43 | +# | | | -----------------> package build number |
| 44 | +# | | --------------------> influxdb3 micro version |
| 45 | +# | ----------------------> influxdb3 minor version |
| 46 | +# ------------------------> major version |
| 47 | +# |
| 48 | +# Importantly: |
| 49 | +# - the tag should start with 'v' (for semver tagging convention) |
| 50 | +# - changes in v3.M.m follow semver and indicate there are code changes |
| 51 | +# - '-B' should be omitted for a new v3.M.n released semver (eg, v3.0.0, not |
| 52 | +# v3.0.0-1); specified starting with '2' for new package builds for this |
| 53 | +# release semver (eg, v3.0.0-2, v3.0.0-3, etc); and specified with '0' for |
| 54 | +# pre-release quality builds (eg, v3.0.0-0.rc.1). |
| 55 | +# - 'Q' is optional but when specified, 'Q' may be one of 'alpha', 'beta' or |
| 56 | +# 'rc'. Furthermore, when 'Q' is set: |
| 57 | +# - 'B' and 'q' must also be specified with 'q' starting at '1' (eg, |
| 58 | +# v3.0.0-0.alpha.1, v3.0.0-0.alpha.2, etc) |
| 59 | +# - 'b' may also be specified with 'Q' and when specified, should start with |
| 60 | +# '1' (eg, v3.0.0-0.alpha.1.1, v3.0.0-0.alpha.1.2, etc) |
| 61 | +# - changes to 'M', 'm', 'Q' and 'q' indicate influxdb code changes compared to |
| 62 | +# prior tags, while 'B' and 'b' indicate only packaging changes. |
| 63 | +# |
| 64 | +# By following these rules, packager should set package versions that are |
| 65 | +# upgradable (eg, in package repositories). |
| 66 | +# |
| 67 | +# The CIRCLE_TAG regex enforces these rules, falling back to |
| 68 | +# 3.0.0+snapshot-<git hash> if it doesn't match. |
1 | 69 | version: |
2 | | - - match: '^v[0-9]+.[0-9]+.[0-9]+(-[0-9]+.(alpha|beta|rc).[0-9]+(.[0-9]+)?)?$' |
| 70 | + - match: '^v[0-9]+\.[0-9]+\.[0-9]+(-([2-9]|[1-9][0-9]+|0\.(alpha|beta|rc)\.[1-9][0-9]*(\.[1-9][0-9]*)?))?$' |
3 | 71 | value: '{{env.CIRCLE_TAG[1:]}}' |
4 | 72 | - match: '.*' |
5 | 73 | value: '3.0.0+snapshot-{{env.CIRCLE_SHA1[:8]}}' |
|
0 commit comments