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

version: validate format of the git tag #12533

Merged
merged 2 commits into from
Jul 23, 2019
Merged

version: validate format of the git tag #12533

merged 2 commits into from
Jul 23, 2019

Conversation

bkueng
Copy link
Member

@bkueng bkueng commented Jul 22, 2019

This fails the build if a wrong version tag is used.
A wrong tag leads to wrong reporting in QGC, and incorrect error messages about minimum required PX4 version.
It also leads to wrong statistics on Flight Review.

@bkueng bkueng force-pushed the validate_git_tag branch 3 times, most recently from d62980e to 6f98f8a Compare July 23, 2019 07:28
Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused why later we use the variable git_version which is directly extracted from another git command and does not go through the check that you added.

Shouldn't these two things be based on the same git command? That way what you extracted and checked is also used (and therefore correct)?

src/lib/version/px_update_git_header.py Outdated Show resolved Hide resolved
src/lib/version/px_update_git_header.py Outdated Show resolved Hide resolved
args = parser.parse_args()
filename = args.filename
verbose = args.verbose
validate = args.validate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nicer with argparse. Overall it would be nice to split this script up into functions but that could follow in a future PR.

bkueng added 2 commits July 23, 2019 11:05
This fails the build if a wrong version tag is used.
A wrong tag leads to wrong reporting in QGC, and incorrect error messages
about minimum required PX4 version.
It also leads to wrong statistics on Flight Review.
@bkueng bkueng force-pushed the validate_git_tag branch from 6f98f8a to 1b3c0d7 Compare July 23, 2019 09:06
@bkueng
Copy link
Member Author

bkueng commented Jul 23, 2019

I'm confused why later we use the variable git_version which is directly extracted from another git command and does not go through the check that you added.

git_version is for the current hash, so it cannot be the same command or the same checks.

@bkueng bkueng merged commit ac5669d into master Jul 23, 2019
@bkueng bkueng deleted the validate_git_tag branch July 23, 2019 11:16
@dagar dagar mentioned this pull request Jul 25, 2019
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.

2 participants