Skip to content

Set default AppVer for main branch #18146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

wxiaoguang
Copy link
Contributor

I propose to always have a valid AppVer in code base, and we should bump it for every major release.

For example, in this PR:

The gitea-sdk expects to get a valid AppVer from server response, and the gitea-sdk also have some version-depended behaviors.

@techknowlogick
Copy link
Member

please see discussion in regards to this line here: #9916

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 1, 2022
@wxiaoguang
Copy link
Contributor Author

please see discussion in regards to this line here: #9916

How to resolve the problem described in #18124 (#18124 (review)) ? If we do not set AppVer globally, then it would appear in many unit tests.

@@ -27,7 +27,7 @@ import (

var (
// Version holds the current Gitea version
Version = "development"
Version = "1.16.9999+dev-main"
Copy link
Contributor

@Gusted Gusted Jan 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So to dismantle this:

1.16
Gitea's version

.9999
Uhm.... minor patch is quite high. Guess this is the indication that it's built from development?

+dev-main
IIRC it should be -dev+main. But I'm not sure about the +main part as that is mostly used for build metadata, or something along those lines. Otherwise this could be used as indication that it's development built and then leave the minor patch alone.

Copy link
Contributor Author

@wxiaoguang wxiaoguang Jan 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.9999: because the main branch is always newer than any released version. So I choose the impossible version number 9999. Even during update check, the Gitea 1.16.9999 in development won't tell developers that "there is a new version 1.16.8 available".

+dev-main: it comes from the current Gitea version format, for exmpale, on try.gitea.io: 1.16.0+dev-782-gde8e3948a. And yes, maybe we do not need the last main, we could use 1.16.9999+dev or 1.16.9999+dev-local instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that sense I think we can use +dev-local.

@6543
Copy link
Member

6543 commented Jan 2, 2022

I'll "fix" the sdk ... please not this again ...

@6543
Copy link
Member

6543 commented Jan 2, 2022

@6543 6543 closed this Jan 2, 2022
@wxiaoguang wxiaoguang deleted the set-appver branch January 3, 2022 03:10
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants