atlas-packer-vagrant-tutorial icon indicating copy to clipboard operation
atlas-packer-vagrant-tutorial copied to clipboard

What is the best approach to deal with VERSION in atlas post-processor?

Open wasadigi opened this issue 9 years ago • 1 comments

If I use the template and want to update the box, then I need to update the version field in the metadata:

"metadata": {
"provider": "virtualbox",
"version": "0.0.4"

Not very difficult, but I am sure that there is a way to automate the process, so that I don't have to manually edit the template file each time something changes in my config. What is the recommended way to approach this?

wasadigi avatar Jan 27 '16 16:01 wasadigi

if you leave version blank in the template: "version": "" you can provide the version on the command line. here is an example from boxcutter which they use the VERSION file in their repo and cat that with their build script and pass that to the packer command https://github.com/boxcutter/centos/blob/master/bin/build-box#L54

akemner avatar Apr 01 '16 05:04 akemner