# Using --provides rootfs-image.myapp.version with mender-convert

**URL:** <https://hub.mender.io/t/using-provides-rootfs-image-myapp-version-with-mender-convert/3153>\
**Category:** General Discussions\
**Tags:** mender-convert, app-version\
**Created:** [January 28, 2021, 11:17pm UTC](https://hub.mender.io/t/using-provides-rootfs-image-myapp-version-with-mender-convert/3153 "2021-01-28T23:17:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![martind](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@martind](https://hub.mender.io/u/martind)\
**Post date:** [January 28, 2021, 11:17pm UTC](https://hub.mender.io/t/using-provides-rootfs-image-myapp-version-with-mender-convert/3153/1 "2021-01-28T23:17:54Z")

</div>

I am creating a mender converted image that includes a version of my application. I would like to include the version of the app in the image so it is reported on inventory check in.

I know that the `--provides rootfs-image.myapp.version:VERSION` can be used to embed the application version in the image using mender-artifact. Can the same argument be used with mender-convert?

Thanks!

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [January 28, 2021, 11:41pm UTC](https://hub.mender.io/t/using-provides-rootfs-image-myapp-version-with-mender-convert/3153/2 "2021-01-28T23:41:10Z")

</div>

if you want the app version as part of the inventory check-in, you could auto-generate a key-value pair as part of your mender inventory script that’s what I do. Consider shipping your application with something like a VERSION.TXT file or bake the version into your application binary so you can do something like

> myapp -v

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [January 29, 2021, 7:07pm UTC](https://hub.mender.io/t/using-provides-rootfs-image-myapp-version-with-mender-convert/3153/3 "2021-01-29T19:07:30Z")

</div>

Yes, but you will need to create an hook for the artifact creation step to use that command line option directly to the mender-artifact command. See [this link](https://docs.mender.io/system-updates-debian-family/convert-a-mender-debian-image/customization#function-override-hook) for more details.  
Drew

---

<div class="post-metadata">

**Author:** ![martind](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@martind](https://hub.mender.io/u/martind)\
**Post date:** [February 11, 2021, 5:44pm UTC](https://hub.mender.io/t/using-provides-rootfs-image-myapp-version-with-mender-convert/3153/4 "2021-02-11T17:44:53Z")

</div>

Thanks for your help. If I use @dellgreen suggestion to use an inventory script could I use that to update the artifact\_name attribute?

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [February 11, 2021, 6:31pm UTC](https://hub.mender.io/t/using-provides-rootfs-image-myapp-version-with-mender-convert/3153/5 "2021-02-11T18:31:47Z")

</div>

I’m not sure I follow but I think not. You can use his method to add a new field to [the inventory](https://docs.mender.io/overview/inventory). You should not modify the Artifact name, and I’m not sure it would even be possible.

Drew
