casdoor / casdoor

An open-source UI-first Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, RADIUS, Google Workspace, Active Directory and Kerberos
https://casdoor.org
Apache License 2.0
9.2k stars 1.09k forks source link

fix: version cannot be displayed in docker image #2993

Closed seeleclover closed 3 weeks ago

seeleclover commented 3 weeks ago

fix: #2981

I think this interface should determine which method to use to obtain the version based on the runmode in conf/app.conf. If it is dev, then obtain the version through Git History; If it is prod, then obtain the version through version_info.txt.

If users run Casdoor through compilation and in Production Mode, they should be required to generate version_info.txt after go build. I also create a PR in the Git repository of the Casdoor Document.

casbin-bot commented 3 weeks ago

@tangyang9464 @imp2002 please review

CLAassistant commented 3 weeks ago

CLA assistant check
All committers have signed the CLA.

hsluoyz commented 3 weeks ago

"runmode" is mostly useless, we don't use it in such scenario.

hsluoyz commented 3 weeks ago

@seeleclover as an advice, discuss with the community first before making a PR, to save your time