Skip to content
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

docker: align image tags with GoReleaser artifacts #1841

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

aofei
Copy link
Member

@aofei aofei commented Apr 7, 2024

Following the changes introduced in #1838, this commit updates Docker image and manifest tags to align with the GoReleaser artifact naming conventions. The changes are as follows:

  • Image tags have been updated from "v1.2.3-i386" to "1.2.3-386", from "v1.2.3-x86_64" to "1.2.3-amd64", "v1.2.3-arm64" to "1.2.3-arm64".
  • The version prefix "v" has been removed from the image manifest tags, changing "v1.2.3" to "1.2.3", "v1.2" to "1.2", and "v1" to "1".

Should we keep the v prefix? I referred to the tag style of docker.io/library/golang and removed the v prefix. (See: https://hub.docker.com/_/golang/tags?name=-alpine3.19)

/cc @xushiwei @cpunion

Following the changes introduced in goplus#1838, this commit updates Docker
image and manifest tags to align with the GoReleaser artifact naming
conventions. The changes are as follows:

- Image tags have been updated from "v1.2.3-i386" to "1.2.3-386", from
  "v1.2.3-x86_64" to "1.2.3-amd64", "v1.2.3-arm64" to "1.2.3-arm64".
- The version prefix "v" has been removed from the image manifest tags,
  changing "v1.2.3" to "1.2.3", "v1.2" to "1.2", and "v1" to "1".

Signed-off-by: Aofei Sheng <[email protected]>
Copy link

codecov bot commented Apr 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.63%. Comparing base (e1b4f80) to head (8faa4ae).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1841   +/-   ##
=======================================
  Coverage   92.63%   92.63%           
=======================================
  Files          41       41           
  Lines       11456    11456           
=======================================
  Hits        10612    10612           
  Misses        682      682           
  Partials      162      162           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cpunion
Copy link
Contributor

cpunion commented Apr 7, 2024

The 'v' prefix should perhaps be removed anywhere, includes instances such as:

  1. Version display in terminal commands:
$ go version
go version go1.22.1 darwin/arm64
$ gop version
gop v1.2.3 darwin/arm64
  1. Version tags on GitHub:

@xushiwei
Copy link
Member

xushiwei commented Apr 7, 2024

The 'v' prefix should perhaps be removed anywhere, includes instances such as:

  1. Version display in terminal commands:
$ go version
go version go1.22.1 darwin/arm64
$ gop version
gop v1.2.3 darwin/arm64
  1. Version tags on GitHub:

I don’t think there’s a right answer to this question, but it’s important not to break previously established conventions.

@xushiwei
Copy link
Member

xushiwei commented Apr 7, 2024

The behavior of gop version and tag has been fixed and will not change. However, the name of the release file has not been finalized. We can determine a standard. For example, Go looks like this:

@aofei
Copy link
Member Author

aofei commented Apr 7, 2024

The 'v' prefix should perhaps be removed anywhere, includes instances such as:

  1. Version display in terminal commands:
$ go version
go version go1.22.1 darwin/arm64
$ gop version
gop v1.2.3 darwin/arm64
  1. Version tags on GitHub:

Gop, being a Go project (aka a Go module), requires v prefixed Git tags as per Go module standards. Thus, we must use the format v1.2.5.

@cpunion
Copy link
Contributor

cpunion commented Apr 7, 2024

Gop, being a Go project (aka a Go module), requires v prefixed Git tags as per Go module standards. Thus, we must use the format v1.2.5.

Forgot that.

This PR is acceptable. For tagging Docker images, using the version number followed by a suffix without v prefix is more commonly.

@xushiwei xushiwei merged commit fc2a773 into goplus:main Apr 7, 2024
21 checks passed
@aofei aofei deleted the docker_tags branch April 7, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants