ad-oliviero / uwufetch

A meme system info tool for Linux, based on nyan/uwu trend on r/linuxmasterrace.
GNU General Public License v3.0
749 stars 52 forks source link

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

Open antecrescent opened 11 months ago

antecrescent commented 11 months ago

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):

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

ad-oliviero commented 11 months ago

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

antecrescent commented 11 months ago

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 commented 11 months ago

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

ad-oliviero commented 11 months ago

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)