API-reported version does not include tags #22

Closed
opened 2023-02-10 15:21:56 +01:00 by Sybren A. Stüvel · 8 comments

Our Gitea build doesn't include any tags in its version info. You can see this in the response to https://projects.blender.org/api/v1/version

The current response is {"version":"a8c6cbf"}
The expected response is {"version":"1.19.0+dev-525-ga8c6cbf89"}

This is caused by our fork on Github not having any tags. If you do the following to fetch the upstream tags & rebuild, things work as expected:

git remote add upstream https://github.com/go-gitea/gitea.git
git fetch upstream

The biggest issue with the current situation is that Tea borks on our githash-only version info: https://gitea.com/gitea/tea/issues/531#issuecomment-727512

Our Gitea build doesn't include any tags in its version info. You can see this in the response to https://projects.blender.org/api/v1/version The current response is `{"version":"a8c6cbf"}` The expected response is `{"version":"1.19.0+dev-525-ga8c6cbf89"}` This is caused by our fork on Github not having any tags. If you do the following to fetch the upstream tags & rebuild, things work as expected: ``` git remote add upstream https://github.com/go-gitea/gitea.git git fetch upstream ``` The biggest issue with the current situation is that Tea borks on our githash-only version info: https://gitea.com/gitea/tea/issues/531#issuecomment-727512
Brecht Van Lommel added the
deployment
label 2023-02-12 14:59:04 +01:00

So I guess this is just a deployment thing to add by @Arnd, to fetch upstream.

So I guess this is just a deployment thing to add by @Arnd, to fetch upstream.
Author
Owner

Yup.

Yup.
Arnd Marijnissen was assigned by Brecht Van Lommel 2023-02-13 10:58:17 +01:00

I've built a binary using the following steps:

git clone --depth 1 --branch blender-merged https://github.com/blender/gitea.git gitea
cd gitea
git remote add upstream https://github.com/go-gitea/gitea.git
git fetch upstream

This created a binary which reports the following when using ./gitea -v

Gitea version 309fd9efe built with GNU Make 4.3, go1.19.5 : bindata

A subsequent deployment on a test-server also doesnt seem to show the version in the banner-bar at the bottom.

I've built a binary using the following steps: ``` git clone --depth 1 --branch blender-merged https://github.com/blender/gitea.git gitea cd gitea git remote add upstream https://github.com/go-gitea/gitea.git git fetch upstream ``` This created a binary which reports the following when using ```./gitea -v``` ``` Gitea version 309fd9efe built with GNU Make 4.3, go1.19.5 : bindata ``` A subsequent deployment on a test-server also doesnt seem to show the version in the banner-bar at the bottom.

I would try git fetch upstream --tags.

I would try `git fetch upstream --tags`.

Same result.

Also checked the /api/v1/version result.

Is anything else required for this to work?
Has anyone been able to reproduce the desired result with a blender-merged build ?

Same result. Also checked the /api/v1/version result. Is anything else required for this to work? Has anyone been able to reproduce the desired result with a blender-merged build ?
Author
Owner

It's the git clone --depth 1 that breaks the whole thing. Git needs the history to know which tag is the most recent one that applies to the current HEAD.

You don't need to build Gitea for this, just run git describe -- it should output something along the lines of v1.19.0-dev-551-g309fd9efe.

It's the `git clone --depth 1` that breaks the whole thing. Git needs the history to know which tag is the most recent one that applies to the current `HEAD`. You don't need to build Gitea for this, just run `git describe` -- it should output something along the lines of `v1.19.0-dev-551-g309fd9efe`.

This produced a winner.
I have a build ready for deployment that lists itself as

Gitea version 1.19.0+dev-551-g309fd9efe built with GNU Make 4.3, go1.19.5 : bindata

I'll check for a good moment to deploy it; perhaps together with some other planned changes.

This produced a winner. I have a build ready for deployment that lists itself as ``` Gitea version 1.19.0+dev-551-g309fd9efe built with GNU Make 4.3, go1.19.5 : bindata ``` I'll check for a good moment to deploy it; perhaps together with some other planned changes.

Closing since this was fixed.

Closing since this was fixed.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/blender-projects-platform#22
No description provided.