Add variables for versioning based on time

cribs2's Avatar

cribs2

05 Oct, 2017 03:45 AM

Hello,

We use the following format for our ci builds, and would like to be able to do this in a simple way with appveyor.

1.0.0-ci-[2-digit year]][3-digit day of year][2-digit revision for day]

An example would be: 1.0.0-ci-1727701

From what I can see, using any kind of date info is not possible without using powershell commands in the init script, but because I am manually overriding the build version, I am not sure how to reset the revision number every day.

In Visual Studio Team Services, our build number format looks like this:
$(Year:yy)$(DayOfYear)$(Rev:rr)

It would be nice to be able to do something similar in appveyor, maybe one of the following:
version: 1.0.0-ci-{date:yyDDD}{revision:00}
version: 1.0.0-ci-{year:00}{dayofyear:000}{revision:00}
version: 1.0.0-ci-{year:2}{dayofyear:3}{revision:2}

Thanks!
Chris

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac