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
build.go: validate -version argument against regex from lib/build #9322
base: main
Are you sure you want to change the base?
Conversation
Huh, some tests are already failing. That's interesting. I don't know much about CI pipeline but it seems like |
Right, so it is, because the builds there do a shallow checkout. I added an exception for Of course, disallowing the just-a-hash "versions" is correct, that's part of why we do this check to begin with. I guess options to fix it is to do full checkouts in more places in github actions, or have getVersion() return |
I think it depends on how resulting build are used. If it's just to test compilation then When build artifacts then used for packaging, then build process should be fixed. I don't think it's the case because production builds don't fail AFAIK. |
Perhaps a third option is to generate something like Indeed we don't produce binaries like this (and hopefully nobody else either), but being able to run tests without knowing the correct version number might be useful. |
In syncthing#9267 it was mentioned that binaries built with incompatible versions can't be run. To avoid situations like this completely, same regex is used to validate manually provided verions.
32cca86
to
e2c5f1d
Compare
I'd suggest to add a check in runtime that will send a log message and visible warning in UI for |
In #9267 it was mentioned that binaries built with incompatible versions can't be run.
To avoid situations like this completely, same regex is used to validate manually provided versions.