Last Updated: February 25, 2016
·
782
· wilhelmbot

Automatic build versioning with the `date` command

Automate your build versioning by using the date command in your Rakefile to append a timestamp:

app.version = "1.1.1.#{`date +%V%u`}".strip

Try this shell commands:

Week of the year

$ date +%V  
01

Day of the week

$ date +%u  
3