Tim Long
Tim Long

Reputation: 13778

Is there a way to use GitVersion to "version stamp" an Arduino project during build?

I create firmware for devices based on Arduino hardware. I use Visual Studio and the Visual Micro add-in for Arduino support within Visual Studio.

It would be handy to use GitVersion (or something similar) to have a version created for each build. However, Arduino projects use their own build system and don't rely on MSBuild.

Does anyone know of a way to "hook" GitVersion into a Visual Micro Arduino build?

Upvotes: 0

Views: 50

Answers (1)

Gary Ewan Park
Gary Ewan Park

Reputation: 18981

It is unlikely that you will get anything that will "just" do this for you.

Instead, you are likely going to want to use some form of build system to do this work for you.

For example, I use GitVersion to version my Visual Studio Code Extension projects. There is no direct way to bump the package.json file that is used there from GitVersion. Instead, I use GitVersion to assert what the version number is, and then I use a tool called MagicChunks to take this version number and put it into the correct place.

This is all orchestrated using a tool called Cake to do this work.

So essentially, what I am saying is, use GitVersion to "get" the version number, and then use another tool to "put" that number where it needs to be. This can be done using whatever orchestration tool makes the most sense for you, and your project.

Upvotes: 1

Related Questions