wpilibsuite / RobotBuilder

Generate C++ or Java FRC programs
Other
36 stars 29 forks source link

Use a generated wpilib version based on git tag #212

Open sciencewhiz opened 4 years ago

sciencewhiz commented 4 years ago

Similar to how is done for wpilibj, but should only be the release tag.

ThadHouse commented 3 years ago

This is already done. We use the version number from the tags, and this is what gets placed in the manifest. The only fixed version number we have is the fallback if there is no manifest.

https://github.com/wpilibsuite/RobotBuilder/blob/master/build.gradle#L128

I see no difference of using the manifest vs using generating a file, especially since for local builds the version would be incorrect for generated projects anyway.

sciencewhiz commented 3 years ago

The value in the manifest is bad on anything other then a release build. I can't give someone a development build or a PR build, because it uses the value in the manifest which isn't a valid GradleRIO version. It also doesn't work when you use ./gradlew run. If we use a generated version file, with appropriate rules to translate development and local build versions into the correct gradlerio version, it would solve all those problems, and keep from having to update the version number each release as a fall back.

ThadHouse commented 3 years ago

How would we know the correct GradleRio version? We could make it just generate the primary version number without any extra bits easily enough.

But that would all be done at build time, so doing the manifest vs a generated file wouldn't matter. You could do the trying to be smart logic for both methods.

sciencewhiz commented 3 years ago

The manifest + logic works for everything except running robotbuilder from gradle