<MAJOR>.<MINOR>.(<branch>)<YY><MM>.<DD><number-of-commits>
MAJOR,MINOR- Inferred fromVersionprovided in the*projfile orDirectory.Build.propsbranch- Optional number to identify a major branch, the higher, the more production - this is used to "protect" production from accidental manual deploys, since in deploying a solution with lower version will fail by default. Maximum value is5due to build number limitation in Windows.YY,MM,DD- Parts of last commit's to the project date, eg.2509number-of-commits- Total number of commits (formated as000) in the day the last commit was made (includes commits from referenced projects). There is a limit of999commits per day (again due to size).
Since PCFs use semantic versioning, and there are some nuances with changing the major and minor numbers. The maximum value for each part is 2,147,483,647 (32-bit integer). With PCFs it is impossible to push a lower version of PCF (even with ForceUpdate=TRUE). We currently assemble the PCF version as following from the outputs generated above (this applies also when not using the generate version):
0.0.<SECONDS_FROM_2020-01-01_TILL_LAST_COMMIT_OR_NOW>
There may obviously be some edge cases. If you find any, please report them or submit a PR to fix it!
If you make a change to a solution with a referenced project on the same day, and then remove a project reference on the same day, the second build version is going to be lower and the solution will fail to import. This is most likely to happen in non-production branches and the known workaround is to make a commit and rebuild the affected solution the next day. This is to change in future.
Each number of version is limited by ushort's maximum size. If you do more than 999 commits per day across all referenced projects, you will end up with an error. A workaround is to bump projects with too many commits in that day to a single commit the next day. Alternatively, you can consider using squashing commits. If you hit this, please reach out to us.