openimsdk / open-im-server

IM Chat
https://openim.io
Apache License 2.0
13.74k stars 2.42k forks source link

The expectation is for the branch and tag versions to align with the server version #574

Open skiffer-git opened 1 year ago

skiffer-git commented 1 year ago

Checklist

Is this feature request related to a problem?

None

Problem Description

Solution Description

The expectation is for the branch and tag versions to align with the server version, and for the server to print the actual version information upon startup.

Benefits

The expectation is for the branch and tag versions to align with the server version, and for the server to print the actual version information upon startup.

Potential Drawbacks

No response

Additional Information

No response

kubbot commented 1 year ago

This issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles: Join slack πŸ€– to connect and communicate with our developers. If you wish to accept this assignment, please leave a comment in the comments section: /accept.🎯

cubxxw commented 1 year ago

/accept

openimbot commented 1 year ago

@cubxxw Glad to see you accepted this issue🀲, this issue has been assigned to you. I set the milestones for this issue to , We are looking forward to your PR!

cubxxw commented 1 year ago

The SemVer specification format is [name]x.y.z-[state+buildmetadata], for example, v2.1.5 and v1.2.3-alpha-1 +001.

cubxxw commented 1 year ago

go build -ldflags can pass the specified arguments to go tool's link in the format: -ldflags '[pattern=]arg list', for example: -X importpath.name=value. Run go tool link -h:

root@PS2023EVRHNCXG:~/workspaces/openim/Open-IM-Server# go tool link -h  | grep "-X"
grep: option requires an argument -- 'X'
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.
usage: link [options] main.o
  -B note
        add an ELF NT_GNU_BUILD_ID note when using ELF
  -E entry
        set entry symbol name
  -H type
        set header type
  -I linker
        use linker as ELF dynamic linker
  -L directory
        add specified directory to library path
  -R quantum
        set address rounding quantum (default -1)
  -T address
        set text segment address (default -1)
  -V    print version and exit
  -X definition
        add string value definition of the form importpath.name=value
cubxxw commented 1 year ago

You can see that -X importpath.name=value tells the Go linker to assign value to the name variable in the importpath package. Note: name must be a string variable, otherwise the compiler will report the following error

cubxxw commented 1 year ago
go build -ldflags "-X main.GitVersion=v1.0.0 -X main.BuildDate=$(date +%F)" -o version main.go
kubbot commented 11 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

kubbot commented 9 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

kubbot commented 6 months ago

This issue was closed because it has been stalled for 7 days with no activity.

cubxxw commented 6 months ago

restart

kubbot commented 6 months ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


restart

kubbot commented 3 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.