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 extra version information to avrdude output #1927

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

ndim
Copy link
Contributor

@ndim ndim commented Oct 8, 2024

Some downstream projects build avrdude and want to add their own version information to the avrdude version.

This adds a clean way to do that without patching for both cmake and automake based builds:

cmake -DEXTRA_VERSION:STRING=-arduino.1-rc1
../configure EXTRA_VERSION=-arduino.1-rc1

After building avrdude, the last line of "avrdude -?" will now look similar to the following, depending on whether you are building an avrdude git checkout or an avrdude release:

avrdude version 8.0-20240901-arduino.1-rc1 (30e19f23), https://github.com/avrdudes/avrdude
avrdude version 8.1-arduino.1-rc1 (30e19f23), https://github.com/avrdudes/avrdude

@ndim
Copy link
Contributor Author

ndim commented Oct 8, 2024

This came up in arduino/avrdude-packing#31

@ndim ndim mentioned this pull request Oct 8, 2024
3 tasks
@ndim
Copy link
Contributor Author

ndim commented Oct 8, 2024

EXTRA_VERSION might not be the best name for this. It just came to mind without me thinking much.

Better names welcome.

@mcuee mcuee added the enhancement New feature or request label Oct 9, 2024
@mcuee
Copy link
Collaborator

mcuee commented Oct 9, 2024

I think EXTRA_VERSION is not bad.

Maybe CUSTOM_VERSION is another option.

@MCUdude

Which one do you prefer?

Other than the name, this PR should be good to go.

@MCUdude
Copy link
Collaborator

MCUdude commented Oct 9, 2024

@mcuee I'm fine with either. Another alternative is VERSION_SUFFIX, which will be -arduino.1 in this case

umbynos added a commit to arduino/avrdude-packing that referenced this pull request Oct 9, 2024
upstream PR: avrdudes/avrdude#1927

Co-authored-by: Hans Ulrich Niedermann <hun@n-dimensional.de>
umbynos added a commit to arduino/avrdude-packing that referenced this pull request Oct 9, 2024
upstream PR: avrdudes/avrdude#1927

Co-authored-by: Hans Ulrich Niedermann <hun@n-dimensional.de>
@mcuee
Copy link
Collaborator

mcuee commented Oct 9, 2024

@mcuee I'm fine with either. Another alternative is VERSION_SUFFIX, which will be -arduino.1 in this case

I like your proposal better.

@ndim
How about you?

umbynos added a commit to arduino/avrdude-packing that referenced this pull request Oct 9, 2024
upstream PR: avrdudes/avrdude#1927

Co-authored-by: Hans Ulrich Niedermann <hun@n-dimensional.de>
@mcuee
Copy link
Collaborator

mcuee commented Oct 9, 2024

@MCUdude

@umbynos has released Arduino flavor of avrdude 7.3 and avrdude 8.0. You may want to try it on your macOS machine. I will try it as well on my machines later this week.
https://github.com/arduino/avrdude-packing/releases

@umbynos
Thanks a lot for the efforts.

@ndim
Copy link
Contributor Author

ndim commented Oct 9, 2024

Given EXTRA_VERSION and VERSION_SUFFIX, I would actually favour EXTRA_VERSION_SUFFIX.

That is a bit longer, but its three parts say all there is to know, making its name explain itself:

  • EXTRA Optional extra information (not mandatory)...
  • VERSION ...for the program version...
  • SUFFIX ...added as a suffix.

@ndim
Copy link
Contributor Author

ndim commented Oct 9, 2024

It should also be mentioned here that even though #1698 will always show git information like hash, branch , and tag (if built from git checkout) in its new --version output, none of that information will be part of the shorter version string as shown at the end of avrdude -?.

So this PR will not be obsoleted by #1698.

@mcuee
Copy link
Collaborator

mcuee commented Oct 10, 2024

Given EXTRA_VERSION and VERSION_SUFFIX, I would actually favour EXTRA_VERSION_SUFFIX.

That is a bit longer, but its three parts say all there is to know, making its name explain itself:

  • EXTRA Optional extra information (not mandatory)...
  • VERSION ...for the program version...
  • SUFFIX ...added as a suffix.

I am fine with this proposal.

Some downstream projects build avrdude and want to add their
own version information to the avrdude version to distinguish
their builds from others.

This adds a clean way to do that without needing to patch the
avrdude sources, for both cmake and automake based builds:

    cmake -DEXTRA_VERSION:STRING=-arduino.1-rc1
    ../configure EXTRA_VERSION=-arduino.1-rc1

After building avrdude, the last line of "avrdude -?" will now
look similar to the following, depending on whether you are
building an avrdude git checkout or an avrdude release tarball:

    avrdude version 8.0-20240901-arduino.1-rc1 (30e19f2), https://github.com/avrdudes/avrdude
    avrdude version 8.1-arduino.1-rc1 (30e19f2), https://github.com/avrdudes/avrdude
@ndim ndim force-pushed the add-extra-version-information branch from a52d814 to cb53a34 Compare October 10, 2024 11:41
@ndim
Copy link
Contributor Author

ndim commented Oct 10, 2024

I have changed the name to EXTRA_VERSION_SUFFIX. I think this is ready to be merged.

@mcuee mcuee merged commit 0b92721 into avrdudes:main Oct 10, 2024
14 checks passed
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

Successfully merging this pull request may close these issues.

4 participants