ripmeapp2 / ripme

Downloads albums in bulk
MIT License
302 stars 38 forks source link

When building from archive, calculated version is wrong and useless for version checks #145

Closed txtsd closed 11 months ago

txtsd commented 1 year ago

When building from an archive like this one, the version string created is 0.0.0-NOT_A_GIT_REPOSITORY

When building from a PKGBUILD as an AUR package maintainer (for the package ripme), since the source files from the archive don't contain git information, fr.brouillard.oss.gradle.jgitver ends up using the git info of the AUR package resulting in a version string like 0.0.0-10-a902e065.

Both of these cases make the version string useless for version checks against the latest version.

Expected Behavior

Version should be set and queried explicitly.

Actual Behavior

When git information is not available in the correct directory, the fallback mechanism should not create an incorrect version. It should be able to build the correct version string from the source files, and not rely solely on git information.

soloturn commented 1 year ago

i see what you mean, must admit i never tried it before now. why do you prefer to build from an archive instead of partial checked out git from tag, @txtsd ? git has a hash code which should guarantee the files are like commited, same as for a tar with hash?

txtsd commented 1 year ago

So in the AUR, there are build-from-archive packages ($pkgname), binary packages ($pkgname-bin), and build-from-source packages ($pkgname-{git,hg}). The first kind build from an archived tarball of the source (without vcs information), the second kind just package an official binary, and the last kind pull the source repo and build it that way. Users can choose whichever fits their use case per their convenience.

soloturn commented 1 year ago

you r not allowed to use the tag in git for the same source? i tried to look for an alternativre to jgitver, or a parameter to it to give a more reasonable default version than 0.0.0 ... but no luck.

txtsd commented 1 year ago

you r not allowed to use the tag in git for the same source?

No the archives don't contain git information, and those packages mustn't depend on vcs software like git to be built.

i tried to look for an alternativre to jgitver, or a parameter to it to give a more reasonable default version than 0.0.0 ... but no luck.

Why not just a string in a file?

txtsd commented 11 months ago

Excellent! Thank you.