Skip to content

Further tweaks to version string#1895

Merged
pfeerick merged 2 commits intomainfrom
pr_number_tweaks
Apr 26, 2022
Merged

Further tweaks to version string#1895
pfeerick merged 2 commits intomainfrom
pr_number_tweaks

Conversation

@pfeerick
Copy link
Member

@pfeerick pfeerick commented Apr 25, 2022

Further builds on #1850, #1887

Summary of changes:

  • uses proper CMake syntax to only define VERSION_TAG when it is passed in (before it was always defined, but as an empty string)
  • ensures build-gh.sh won't unconditionally set EDGETX_VERSION_SUFFIX on selfbuilds
  • also omits commit SHA on colorlcd (as I had already done that on B&W)

From the testing I've done so far (by overriding EDGETX_VERSION_TAG and EDGETX_VERSION_SUFFIX in build-gh.sh), I know the whole pipeline from build-gh.sh correctly showing the tag, or not showing the tag as required, will just need to do another test build with a tag once this is merged to ensure it is being picked up.

I was tempted to also have VERSION_SUFFIX only defined on existence, but the code logic atm unconditionally expects it to exist if VERSION_TAG doesn't exist, so I left it.

@rotorman

@rotorman
Copy link
Member

rotorman commented Apr 25, 2022

Very nice, thank you Peter for looking into this and improving it even further!

I tested with physical RadioMaster TX16S mkII and Zorro.

First, when flashed with the firmware from this PR/GitHub to TX16S:

grafik

The same codebase, built locally and flashed to the radio:

grafik

Bootloader flashed with the binary from this PR/GitHub:

grafik

Bootloader display output, while the binary from this PR/GitHub is selected:

grafik

Bootloader, while the self-built binary from this PR is selected:

grafik

The screenshots in the same vain with RadioMaster Zorro:

grafik

grafik

grafik

grafik

grafik

Should we go and create a test-tag, that we remove afterwards to see the output (not that I doubt your local build-gh.sh tests)?

@pfeerick
Copy link
Member Author

Sounds good. It's the only way to test if the tag processing in build-gh.sh is working properly, otherwise it's a loaded gun waiting to fire for v2.8.0rc1 ;)

@pfeerick pfeerick linked an issue Apr 25, 2022 that may be closed by this pull request
@pfeerick pfeerick merged commit 3493d69 into main Apr 26, 2022
@pfeerick pfeerick deleted the pr_number_tweaks branch April 26, 2022 00:32
@pfeerick
Copy link
Member Author

pfeerick commented Apr 26, 2022

This is what a tagged version will look like (I deliberately tagged latest commit as v2.7.1 on my own repo - this version does NOT exist for real):

I think the only thing left now is to make sure the about screens do the same or similar, and also check Companion.

TX12
image

X9D+2019
image

NV14
image

@rotorman
Copy link
Member

rotorman commented Apr 26, 2022

Today's nightly on TX16S:

grafik

Presently says -main for the branch it was built from, which is identifiable as nightly build from the others, but more intuitive would be IMHO to list -nightly.

grafik

Do you think, we should tweak:

edgetx/tools/build-gh.sh

Lines 61 to 65 in 3493d69

elif [[ $gh_type = "heads" ]]; then
# heads: refs/heads/<branch_name>
gh_branch=${GITHUB_REF##*/}
export EDGETX_VERSION_SUFFIX=$gh_branch
fi

to say nightly?

@pfeerick
Copy link
Member Author

main is correct in that instance, so perhaps add an environment variable to the action that is looked for in build_gh.sh, and set EDGETX_VERSION_SUFFIX=nightly if that is present? Alternately, add the environment variable anyway, and make it so the script does not set(override) those variables if they already exist ;) But basically, yes :)

rotorman pushed a commit that referenced this pull request Apr 27, 2022
* fix: Only define SUFFIX if PR or BRANCH build
Also, only define `VERSION_TAG` if VERSION_TAG exists.

* fix: Omit GIT SHA for colorlcd also if a tagged build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "*-dev" to version string of non-releases

2 participants