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

feat(deployments): add Image Size to the list of deployments #894

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### To be Released

* feat(deployments): add Image Size to the list of deployments
* fix(backups): backup flag is not required
* build(publish): replace `rm-dist` with `clean`

Expand Down
4 changes: 3 additions & 1 deletion deployments/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"time"

"github.com/dustin/go-humanize"
"github.com/olekukonko/tablewriter"
"gopkg.in/errgo.v1"

Expand All @@ -27,7 +28,7 @@ func List(ctx context.Context, app string, paginationOpts scalingo.PaginationOpt
}

t := tablewriter.NewWriter(os.Stdout)
t.SetHeader([]string{"ID", "Date", "Duration", "User", "Git Ref", "Status"})
t.SetHeader([]string{"ID", "Date", "Duration", "User", "Git Ref", "Status", "Image Size"})

for _, deployment := range deployments {
var duration string
Expand All @@ -43,6 +44,7 @@ func List(ctx context.Context, app string, paginationOpts scalingo.PaginationOpt
deployment.User.Username,
deployment.GitRef,
string(deployment.Status),
humanize.IBytes(deployment.ImageSize),
})
}
t.Render()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/AlecAivazis/survey/v2 v2.3.6
github.com/ScaleFT/sshkeys v1.2.0
github.com/Scalingo/go-scalingo/v6 v6.2.0
github.com/Scalingo/go-scalingo/v6 v6.3.0
github.com/Scalingo/go-utils/errors v1.1.1
github.com/Scalingo/go-utils/logger v1.2.0
github.com/Scalingo/go-utils/retry v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0A
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8=
github.com/ScaleFT/sshkeys v1.2.0 h1:5BRp6rTVIhJzXT3VcUQrKgXR8zWA3sOsNeuyW15WUA8=
github.com/ScaleFT/sshkeys v1.2.0/go.mod h1:gxOHeajFfvGQh/fxlC8oOKBe23xnnJTif00IFFbiT+o=
github.com/Scalingo/go-scalingo/v6 v6.2.0 h1:Czr0aPyOWusrl190OQzqDr0dooYqYrfi/gl3bs/wRtQ=
github.com/Scalingo/go-scalingo/v6 v6.2.0/go.mod h1:Y3QByF4s5i3lpJh87c5FEkSN07CWomN5FPt0X/Qzg0I=
github.com/Scalingo/go-scalingo/v6 v6.3.0 h1:ADtzCCEqx1pdI6VaiOh3u9l8L2tScPp6cIKzvo/lcgE=
github.com/Scalingo/go-scalingo/v6 v6.3.0/go.mod h1:Y3QByF4s5i3lpJh87c5FEkSN07CWomN5FPt0X/Qzg0I=
github.com/Scalingo/go-utils/errors v1.1.1 h1:G7zypaDBj0O6QFvX0xL5dMDXbiBgq+3KKuodldtOpg0=
github.com/Scalingo/go-utils/errors v1.1.1/go.mod h1:gsnGOMma5x3CSgPb8i5eMuHcKi3RvTJ9dWPNRev161c=
github.com/Scalingo/go-utils/logger v1.2.0 h1:E3jtaoRxpIsFcZu/jsvWew8ttUAwKUYQufdPqGYp7EU=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading