dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
650 stars 184 forks source link

Version empty when not building from git #296

Closed juliotux closed 2 months ago

juliotux commented 2 months ago

Astrometry.net uses git to get the AN_GIT_REVISION variable. However, when building from the zip downloaded from the Github releases tab (https://github.com/dstndstn/astrometry.net/archive/refs/tags/{tag}.zip), the .git folder is not present and a version cannot be determined. So, solve-filed --version command returns a empty string. Since there is already a manual version set in __init__.py file, this could be used to determine a version if git is not present.

dstndstn commented 2 months ago

Don't use the .zip link, there's a specially created tarball for each release.

dstndstn commented 2 months ago

(eg https://github.com/dstndstn/astrometry.net/releases/tag/0.95 the astrometry.net-0.95.tar.gz link)

dstndstn commented 2 months ago

Or, you could manually set AN_GIT_REVISION=0.95 when building.

But if you wanted to modify the Makefile (util/makefile.common) so that AN_GIT_REVISION grabs the version out of init.py if git is not available, that would be a useful improvement!

juliotux commented 2 months ago

The .tar.gz link doesn't contain the .git folder too. Needed to set the version manually.

dstndstn commented 2 months ago

Oh, yes, of course you are right!!! Sorry!

juliotux commented 2 months ago

Sorry, my fault. The .tar.gz already replaced the version

AN_GIT_REVISION := 0.95
AN_GIT_DATE := Mon_May_6_18:41:28_2024_-0400
AN_GIT_URL := https://github.com/dstndstn/astrometry.net

No need to set manualy.

dstndstn commented 2 months ago

Okay, I forgot about that :)

On Tue, May 7, 2024 at 11:22 AM Julio Campagnolo @.***> wrote:

Sorry, my fault. The .tar.gz already replaced the version

AN_GIT_REVISION := 0.95 AN_GIT_DATE := Mon_May_6_18:41:282024-0400 AN_GIT_URL := https://github.com/dstndstn/astrometry.net

No need to set manualy.

— Reply to this email directly, view it on GitHub https://github.com/dstndstn/astrometry.net/issues/296#issuecomment-2098699450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEH7MLKZ3VFIB6UHFGACTZBDWUJAVCNFSM6AAAAABHLD7F6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGY4TSNBVGA . You are receiving this because you commented.Message ID: @.***>