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

Favors .git version even in release tarball #43

Closed
matthijskooijman opened this issue May 12, 2020 · 0 comments
Closed

Favors .git version even in release tarball #43

matthijskooijman opened this issue May 12, 2020 · 0 comments

Comments

@matthijskooijman
Copy link
Contributor

This is essentially the same issue as OpenTTD/nml#112 for nml. When the dist tarball is put into another git repo (e.g. for the Debian packaging), findversion.sh favors the git detected version over the release version in .ottdrev.

It does seem that .ottdrev is only ever written into the bundles, never in the working directory itself. That means that fixing this could be a matter of reversing the priority in findversion.sh (read .ottdrev if it exists, try git otherwise).

However, it also seems that there is already another mechanism for remembering whether a release versions is used, namely writing GIT= to Makefile.dist. An alternative could be to let the makefile read .ottdrev itself, without even calling findversion.sh when GIT is empty.

Or even cleaner, maybe, would be to write REPO_VERSIONS=... to Makefile.dist and then only call findversion.sh if $REPO_VERSIONS is empty. This would allow removing .ottdrev completely and keep all release-specific info in a single file.

How is that?

Note that this is not a blocking problem right now - in the normal Debian workflow, the package is built in a chroot using an export from the git repo, without a .git directory, so things work as expected. However, this issue does (AFAICT, haven't tried yet) break building from the git directory directly (which would be otherwise supported).

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

No branches or pull requests

1 participant