Skip to content

fix: Prefix buildinfo tag with "v" #1256

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

Merged
merged 1 commit into from
May 2, 2022
Merged

fix: Prefix buildinfo tag with "v" #1256

merged 1 commit into from
May 2, 2022

Conversation

kylecarbs
Copy link
Member

This fixes the format of production and development build
tags.

@kylecarbs kylecarbs requested a review from coadler May 2, 2022 14:18
@kylecarbs kylecarbs self-assigned this May 2, 2022
@codecov
Copy link

codecov bot commented May 2, 2022

Codecov Report

Merging #1256 (9867c81) into main (a71f393) will increase coverage by 0.07%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##             main    #1256      +/-   ##
==========================================
+ Coverage   65.80%   65.87%   +0.07%     
==========================================
  Files         275      272       -3     
  Lines       17972    17784     -188     
  Branches      214      216       +2     
==========================================
- Hits        11826    11715     -111     
+ Misses       4907     4843      -64     
+ Partials     1239     1226      -13     
Flag Coverage Δ
unittest-go-macos-latest 53.32% <28.57%> (+0.09%) ⬆️
unittest-go-postgres- 64.87% <28.57%> (+0.17%) ⬆️
unittest-go-ubuntu-latest 55.62% <28.57%> (+0.06%) ⬆️
unittest-go-windows-2022 ?
unittest-js 70.69% <ø> (+0.09%) ⬆️
Impacted Files Coverage Δ
buildinfo/buildinfo.go 60.78% <28.57%> (-0.92%) ⬇️
cli/configssh.go 62.04% <0.00%> (-6.57%) ⬇️
pty/ptytest/ptytest.go 86.95% <0.00%> (-4.35%) ⬇️
cli/templateinit.go 58.62% <0.00%> (-3.45%) ⬇️
agent/agent.go 64.12% <0.00%> (-2.76%) ⬇️
provisionerd/provisionerd.go 75.76% <0.00%> (-0.54%) ⬇️
coderd/provisionerdaemons.go 62.47% <0.00%> (-0.32%) ⬇️
cli/server.go 58.79% <0.00%> (-0.21%) ⬇️
codersdk/workspaceresources.go 45.45% <0.00%> (ø)
site/src/components/Table/Table.tsx 100.00% <0.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a71f393...9867c81. Read the comment docs.

if semver.Build(tag) == "" {
// The tag must be prefixed with "v" otherwise the
// semver library will return an empty string.
if semver.Build("v"+tag) == "" {
tag += revision
}
version = "v" + tag
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just move this above the semver.Build

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point...

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

This fixes the format of production and development build
tags.
@kylecarbs kylecarbs enabled auto-merge (squash) May 2, 2022 15:56
@kylecarbs kylecarbs merged commit 252d868 into main May 2, 2022
@kylecarbs kylecarbs deleted the fixinfo branch May 2, 2022 15:58
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
kylecarbs added a commit that referenced this pull request Jun 10, 2022
This fixes the format of production and development build
tags.
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