Commit graph

3 commits

Author SHA1 Message Date
adisbladis
349143fce1 auto_version: Use 2023.11.239149 style scheme 2023-11-03 00:23:00 +13:00
Graham Christensen
a1033070ab auto_version: make the tags parse under semver
SemVer has two rules that the previous scheme violates:

1. major/minor/patch numbers can't start with a leading 0. Changing `%d` to `%-d` removes the leading zero. I also applied it to the year just in case :):

```
>>> print(now.strftime(f"%Y.%m.%d"))
2023.09.01
>>> print(now.strftime(f"%Y.%-m.%-d"))
2023.9.1
```

2. there can't be four dot-separated sections of the version. In this PR, I merge the year and month into one field (with a leading zero on the month!) so the seconds is the "patch" version, like this:

```
>>> print(now.strftime(f"%-Y%m.%-d.{modifier}"))
202309.1.82922
```
2023-11-03 00:23:00 +13:00
adisbladis
52850e7d53 Auto-release using a date-based tag on master push 2023-07-07 23:49:48 +12:00