Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamp token #114

Open
JonasBang opened this issue May 25, 2020 · 0 comments
Open

Add timestamp token #114

JonasBang opened this issue May 25, 2020 · 0 comments
Labels
✨ feature New feature or request 🏆 good first issue Good for newcomers
Milestone

Comments

@JonasBang
Copy link
Contributor

JonasBang commented May 25, 2020

Description

To cater for the following use cases, proposal is to add a timestamp option.

Use cases:

  • Need to know exact build time of a build (e.g. to identify exact dependencies used at build time).
  • Need to rebuild a commit (e.g. with newer resolved dependencies), and need to stamp the new build differently from the previous.

Proposed Solution

Add a timestamp token.

It should insert a 10 digit timestamp calculated in seconds since Unix Epoch, and prefix it with 't' (for timestamp).

Name: Timestamp
Token: {timestamp}
Where: label, metadata
Description: Inserts a ten digit timestamp calculated in seconds since Unix Epoch, prefixed with t (for timestamp)

Similar to output from PHP time() function.

Example

Version string with timestamp as metadata: 0.1.0-alpha2.5.c903782+t1525376494
Version string with timestamp as label: 0.1.0-alpha2.5.c903782.t1525376494

@JonasBang JonasBang added the ✨ feature New feature or request label May 25, 2020
@Kieranties Kieranties added the 🏆 good first issue Good for newcomers label May 25, 2020
@Kieranties Kieranties added this to the 0.4.0 milestone Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request 🏆 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants