Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

[BUG] UWUFETCH_VERSION string not set in Github generated archives #247

Open
antecrescent opened this issue Jan 2, 2024 · 4 comments
Open

Comments

@antecrescent
Copy link

Describe the bug
Github automatically creates source code archives which are commonly used by distros to fetch repositories at point releases.
These do not include the .git directory. Consequently, UWUFETCH_VERSION = $(shell git describe --tags) sets an empty string at compile time.

To Reproduce
Steps to reproduce the behavior:

  1. Download https://github.com/github/TheDarkBug/uwufetch/refs/heads/main.tar.gz
  2. Run make build
  3. See described result in e.g. the cc flags.

Expected behavior
Sensible version string regardless of vcs presence in archive. I propose to hardcode the string and update it upon release of a new version. Another option would be to allow users to pass the string as a make argument but this doesn't seem correct to me.

Desktop (please complete the following information):

  • OS: any
  • Version since 2.0

Are you already working on this bug?
I want your feedback on my proposition before proceeding with my proposition.

@ad-oliviero
Copy link
Owner

Yes this is an issue I didn't think about, what solution would you propose?

@antecrescent
Copy link
Author

antecrescent commented Jan 6, 2024

Since UWUFETCH_VERSION only really has meaning at the release versions, I suggest hard-coding and incrementing it only upon release of a new version.

@ad-oliviero
Copy link
Owner

You are right, maybe a better solution would be to add compiler version and other compile-time info for debugging

@ad-oliviero
Copy link
Owner

I implemented a more complex way to "hard code" version tags. Now compiler info is included (for possible debugging purposes), git tag description and the version tag (hard coded as you suggested). Of course the bug will be actually fixed in the next release. I will close the issue before releasing 2.2 (or maybe 3.0, idk)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants