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

Mark "code generated by" with tagged release or commit number #7

Open
bbredesen opened this issue Mar 6, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@bbredesen
Copy link
Owner

For tracking what version of vk-gen was used to generate go-vk, the "Generated code" comment at the top of each file should be marked with a commit number. Figuring out how that will be identified is TBD, may require a shell script to get the info from git. Also need to identify, if possible, what spec version vk.xml is.

Also, clean up the timestamp to remove monotonic clock marker, fractional seconds. Use time.Round(0) or convert to UTC.

Current header:
// Code generated by go-vk from vk.xml at 2023-03-06 11:50:15.7116574 -0600 CST m=+1.971386201. DO NOT EDIT.

Desired format:
// Code generated from $file ver $vkVersion at $shortTimestamp using $executableOrRepository $version. DO NOT EDIT.
i.e.:
// Code generated from vk.xml ver 1.3.240 at 2023-03-06 11:50:15 -0600 CST using vk-gen v1.2.7 DO NOT EDIT.

@bbredesen bbredesen added the enhancement New feature or request label Mar 6, 2023
@asmaloney
Copy link
Contributor

may require a shell script to get the info from git

In case it's useful for inspiration, here's how I get version info and embed it in the build with a small Makefile in one of my projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants