Skip to content

Commit

Permalink
Update to latest minio/minio (#3020)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored and kannappanr committed Dec 24, 2019
1 parent ee28381 commit 7c9ea88
Show file tree
Hide file tree
Showing 10 changed files with 215 additions and 183 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

## Steps to reproduce the behavior

## mc version
- (paste output of `mc version`)
## mc --version
- (paste output of `mc --version`)

## System information

Expand Down
4 changes: 2 additions & 2 deletions cmd/admin-info.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ func (u clusterStruct) String() (msg string) {
usedTotal := humanize.IBytes(uint64(u.Info.Usage.Size))
if u.Info.Buckets.Count > 0 {
msg += fmt.Sprintf("%s Used, %s, %s", usedTotal,
english.Plural(u.Info.Buckets.Count, "Bucket", ""),
english.Plural(u.Info.Objects.Count, "Object", ""))
english.Plural(int(u.Info.Buckets.Count), "Bucket", ""),
english.Plural(int(u.Info.Objects.Count), "Object", ""))
}
if backendType != "FS" {
// Summary on total no of online and total
Expand Down
1 change: 0 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ var appCmds = []cli.Command{
adminCmd,
configCmd,
updateCmd,
versionCmd,
}

func registerApp(name string) *cli.App {
Expand Down
10 changes: 7 additions & 3 deletions cmd/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

package cmd

import "github.com/minio/mc/pkg/console"
import (
"github.com/minio/mc/pkg/console"
)

// message interface for all structured messages implementing JSON(), String() methods.
type message interface {
Expand All @@ -26,9 +28,11 @@ type message interface {

// printMsg prints message string or JSON structure depending on the type of output console.
func printMsg(msg message) {
var msgStr string
if !globalJSON {
console.Println(msg.String())
msgStr = msg.String()
} else {
console.Println(msg.JSON())
msgStr = msg.JSON()
}
console.Println(msgStr)
}
4 changes: 2 additions & 2 deletions cmd/update-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ var (
)

// mcVersionToReleaseTime - parses a standard official release
// mc version string.
// mc --version string.
//
// An official binary's version string is the release time formatted
// with RFC3339 (in UTC) - e.g. `2017-09-29T19:16:56Z`
Expand Down Expand Up @@ -140,7 +140,7 @@ func getModTime(path string) (t time.Time, err *probe.Error) {
}

// GetCurrentReleaseTime - returns this process's release time. If it
// is official mc version, parsed version is returned else mc
// is official mc --version, parsed version is returned else mc
// binary's mod time is returned.
func GetCurrentReleaseTime() (releaseTime time.Time, err *probe.Error) {
if releaseTime, err = mcVersionToReleaseTime(Version); err == nil {
Expand Down
103 changes: 0 additions & 103 deletions cmd/version-main.go

This file was deleted.

29 changes: 0 additions & 29 deletions cmd/version_test.go

This file was deleted.

53 changes: 20 additions & 33 deletions docs/minio-client-complete-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ admin manage MinIO servers
session manage saved sessions for cp command
config manage mc configuration file
update check for a new software update
version print version info
```

## 1. Download MinIO Client
Expand Down Expand Up @@ -247,18 +246,28 @@ Use this option to set a custom config path.
### Option [ --insecure]
Skip SSL certificate verification.

### Option [--version]
Display the current version of `mc` installed

*Example: Print version of mc.*

```
mc --version
mc version RELEASE.2016-04-01T00-22-11Z
```

## 7. Commands

| | | |
|:---|:---|:---|
|[**ls** - List buckets and objects](#ls) |[**tree** - List buckets and objects in a tree format](#tree) |[**mb** - Make a bucket](#mb) | [**cat** - Concatenate an object](#cat) |
|[**cp** - Copy objects](#cp) |[**rb** - Remove a bucket](#rb) | [**pipe** - Pipe to an object](#pipe) |
| [**share** - Share access](#share) | [**rm** - Remove objects](#rm) | [**find** - Find files and objects](#find) |
| [**diff** - Diff buckets](#diff) |[**mirror** - Mirror buckets](#mirror)|[**session** - Manage saved sessions](#session) |
| [**config** - Manage config file](#config) | [**policy** - Set public policy on bucket or prefix](#policy) | [**event** - Manage events on your buckets](#event) |
| [**update** - Manage software updates](#update) | [**watch** - Watch for events](#watch) | [**stat** - Stat contents of objects and folders](#stat) |
| [**head** - Display first 'n' lines of an object](#head) | [**version** - Show version](#version) | |
| | [**sql** - Run sql queries on objects](#sql) | |
| | | | |
|:---------------------------------------------------------|:--------------------------------------------------------------|:---------------------------------------------------------|-----------------------------------------|
| [**ls** - List buckets and objects](#ls) | [**tree** - List buckets and objects in a tree format](#tree) | [**mb** - Make a bucket](#mb) | [**cat** - Concatenate an object](#cat) |
| [**cp** - Copy objects](#cp) | [**rb** - Remove a bucket](#rb) | [**pipe** - Pipe to an object](#pipe) | |
| [**share** - Share access](#share) | [**rm** - Remove objects](#rm) | [**find** - Find files and objects](#find) | |
| [**diff** - Diff buckets](#diff) | [**mirror** - Mirror buckets](#mirror) | [**session** - Manage saved sessions](#session) | |
| [**config** - Manage config file](#config) | [**policy** - Set public policy on bucket or prefix](#policy) | [**event** - Manage events on your buckets](#event) | |
| [**update** - Manage software updates](#update) | [**watch** - Watch for events](#watch) | [**stat** - Stat contents of objects and folders](#stat) | |
| [**head** - Display first 'n' lines of an object](#head) | | | |
| | [**sql** - Run sql queries on objects](#sql) | | |


### Command `ls` - List Objects
Expand Down Expand Up @@ -1140,28 +1149,6 @@ mc update
You are already running the most recent version of ‘mc’.
```

<a name="version"></a>
### Command `version` - Display Version
Display the current version of `mc` installed

```
USAGE:
mc version [FLAGS]
FLAGS:
--quiet, -q suppress chatty console output
--json enable JSON formatted output
--help, -h show help
```

*Example: Print version of mc.*

```
mc version
Version: 2016-04-01T00:22:11Z
Release-tag: RELEASE.2016-04-01T00-22-11Z
Commit-id: 12adf3be326f5b6610cdd1438f72dfd861597fce
```
<a name="stat"></a>
### Command `stat` - Stat contents of objects and folders
`stat` command displays information on objects (with optional prefix) contained in the specified bucket on an object storage. On a filesystem, it behaves like `stat` command.
Expand Down
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/mattn/go-isatty v0.0.7
github.com/mattn/go-runewidth v0.0.5 // indirect
github.com/minio/cli v1.22.0
github.com/minio/minio v0.0.0-20191212015602-d266b3a06604
github.com/minio/minio v0.0.0-20191222063550-725172e13bb7
github.com/minio/minio-go/v6 v6.0.45-0.20191213193129-a5786a9c2a5b
github.com/minio/sha256-simd v0.1.1
github.com/mitchellh/go-homedir v1.1.0
Expand All @@ -27,10 +27,11 @@ require (
go.uber.org/zap v1.11.0 // indirect
golang.org/x/net v0.0.0-20190923162816-aa69164e4478
golang.org/x/text v0.3.2
google.golang.org/grpc v1.22.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
gopkg.in/h2non/filetype.v1 v1.0.5
gopkg.in/yaml.v2 v2.2.2
gopkg.in/yaml.v2 v2.2.4
)

replace github.com/gorilla/rpc v1.2.0+incompatible => github.com/gorilla/rpc v1.2.0

replace github.com/hashicorp/vault => github.com/hashicorp/vault v1.2.0-beta2
Loading

0 comments on commit 7c9ea88

Please sign in to comment.