Skip to content

Commit 48e6b1b

Browse files
stick to go1.13 for now, update credits (#163)
fix release tags for mcs
1 parent 8949fbe commit 48e6b1b

File tree

11 files changed

+97
-55
lines changed

11 files changed

+97
-55
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
go-version: [1.14.x]
17+
go-version: [1.13.x, 1.14.x]
1818
os: [ubuntu-latest]
1919
steps:
2020
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}

.github/workflows/release.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ public.crt
3131
# Ignore VsCode files
3232
.vscode/
3333
*.code-workspace
34+
*~

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ builds:
2323
- -trimpath
2424
- --tags=kqueue
2525
ldflags:
26-
- -s -w -X github.com/minio/mcs/pkg.ReleaseTag={{.Tag}} -X github.com/minio/warp/pkg.CommitID={{.FullCommit}} -X github.com/minio/warp/pkg.Version={{.Version}} -X github.com/minio/warp/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/warp/pkg.ReleaseTime={{.Date}}
26+
- -s -w -X github.com/minio/mcs/pkg.ReleaseTag={{.Tag}} -X github.com/minio/mcs/pkg.CommitID={{.FullCommit}} -X github.com/minio/mcs/pkg.Version={{.Version}} -X github.com/minio/mcs/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/mcs/pkg.ReleaseTime={{.Date}}
2727
archives:
2828
-
2929
replacements:

CREDITS

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20967,6 +20967,31 @@ THE SOFTWARE.
2096720967

2096820968
================================================================
2096920969

20970+
go.uber.org/tools
20971+
https://go.uber.org/tools
20972+
----------------------------------------------------------------
20973+
Copyright (c) 2017 Uber Technologies, Inc.
20974+
20975+
Permission is hereby granted, free of charge, to any person obtaining a copy
20976+
of this software and associated documentation files (the "Software"), to deal
20977+
in the Software without restriction, including without limitation the rights
20978+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20979+
copies of the Software, and to permit persons to whom the Software is
20980+
furnished to do so, subject to the following conditions:
20981+
20982+
The above copyright notice and this permission notice shall be included in
20983+
all copies or substantial portions of the Software.
20984+
20985+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20986+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20987+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20988+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20989+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20990+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20991+
THE SOFTWARE.
20992+
20993+
================================================================
20994+
2097020995
go.uber.org/zap
2097120996
https://go.uber.org/zap
2097220997
----------------------------------------------------------------
@@ -21025,6 +21050,39 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2102521050

2102621051
================================================================
2102721052

21053+
golang.org/x/lint
21054+
https://golang.org/x/lint
21055+
----------------------------------------------------------------
21056+
Copyright (c) 2013 The Go Authors. All rights reserved.
21057+
21058+
Redistribution and use in source and binary forms, with or without
21059+
modification, are permitted provided that the following conditions are
21060+
met:
21061+
21062+
* Redistributions of source code must retain the above copyright
21063+
notice, this list of conditions and the following disclaimer.
21064+
* Redistributions in binary form must reproduce the above
21065+
copyright notice, this list of conditions and the following disclaimer
21066+
in the documentation and/or other materials provided with the
21067+
distribution.
21068+
* Neither the name of Google Inc. nor the names of its
21069+
contributors may be used to endorse or promote products derived from
21070+
this software without specific prior written permission.
21071+
21072+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21073+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21074+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21075+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21076+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21077+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21078+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21079+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21080+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21081+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21082+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21083+
21084+
================================================================
21085+
2102821086
golang.org/x/mod
2102921087
https://golang.org/x/mod
2103021088
----------------------------------------------------------------
@@ -23786,3 +23844,29 @@ https://gopkg.in/yaml.v2
2378623844

2378723845
================================================================
2378823846

23847+
honnef.co/go/tools
23848+
https://honnef.co/go/tools
23849+
----------------------------------------------------------------
23850+
Copyright (c) 2016 Dominik Honnef
23851+
23852+
Permission is hereby granted, free of charge, to any person obtaining
23853+
a copy of this software and associated documentation files (the
23854+
"Software"), to deal in the Software without restriction, including
23855+
without limitation the rights to use, copy, modify, merge, publish,
23856+
distribute, sublicense, and/or sell copies of the Software, and to
23857+
permit persons to whom the Software is furnished to do so, subject to
23858+
the following conditions:
23859+
23860+
The above copyright notice and this permission notice shall be
23861+
included in all copies or substantial portions of the Software.
23862+
23863+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23864+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23865+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23866+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23867+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23868+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23869+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23870+
23871+
================================================================
23872+

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
FROM golang:1.14.1
1+
FROM golang:1.13
22

33
ADD go.mod /go/src/github.com/minio/mcs/go.mod
44
ADD go.sum /go/src/github.com/minio/mcs/go.sum
55
WORKDIR /go/src/github.com/minio/mcs/
6+
67
# Get dependencies - will also be cached if we won't change mod/sum
78
RUN go mod download
89

cmd/mcs/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"os"
2222
"path/filepath"
2323
"sort"
24+
"time"
2425

2526
"github.com/minio/mcs/pkg"
2627

@@ -103,10 +104,12 @@ func newApp(name string) *cli.App {
103104

104105
app := cli.NewApp()
105106
app.Name = name
106-
app.Version = pkg.Version
107+
app.Version = pkg.Version + " - " + pkg.ShortCommitID
107108
app.Author = "MinIO, Inc."
108-
app.Usage = "mcs"
109+
app.Usage = "MinIO Console Server"
109110
app.Description = `MinIO Console Server`
111+
app.Copyright = "(c) 2020 MinIO, Inc."
112+
app.Compiled, _ = time.Parse(time.RFC3339, pkg.ReleaseTime)
110113
app.Commands = commands
111114
app.HideHelpCommand = true // Hide `help, h` command, we already have `minio --help`.
112115
app.CustomAppHelpTemplate = mcsHelpTemplate

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/minio/mcs
22

3-
go 1.14
3+
go 1.13
44

55
require (
66
github.com/coreos/go-oidc v2.2.1+incompatible

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@ github.com/minio/lsync v1.0.1 h1:AVvILxA976xc27hstd1oR+X9PQG0sPSom1MNb1ImfUs=
406406
github.com/minio/lsync v1.0.1/go.mod h1:tCFzfo0dlvdGl70IT4IAK/5Wtgb0/BrTmo/jE8pArKA=
407407
github.com/minio/mc v0.0.0-20200515235434-3b479cf92ed6 h1:2SrKe2vLDLwvnYkYrJelrzyGW8t/8HCbr9yDsw+8XSI=
408408
github.com/minio/mc v0.0.0-20200515235434-3b479cf92ed6/go.mod h1:U3Jgk0bcSjn+QPUMisrS6nxCWOoQ6rYWSvLCB30apuU=
409-
github.com/minio/mc v0.0.0-20200519213124-bf731558cda0 h1:D497vXgHka7/Z3oYFEbFIfAEdWBHbfad8KZ5grSROI0=
410409
github.com/minio/minio v0.0.0-20200421050159-282c9f790a03/go.mod h1:zBua5AiljGs1Irdl2XEyiJjvZVCVDIG8gjozzRBcVlw=
411410
github.com/minio/minio v0.0.0-20200516011754-9cac385aecdb h1:CQC7D3UDnUycuxhwImcVhMSLet/RbShosAnYcvMtEB8=
412411
github.com/minio/minio v0.0.0-20200516011754-9cac385aecdb/go.mod h1:wymaytM/HELuwdz7BGZHmQ3XKq2SxPsLeGxyOCaCLiA=
File renamed without changes.

restapi/configure_mcs.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"strings"
2626

2727
"github.com/minio/mcs/models"
28+
"github.com/minio/mcs/pkg"
2829
"github.com/minio/mcs/pkg/auth"
2930

3031
assetFS "github.com/elazarl/go-bindata-assetfs"
@@ -161,6 +162,7 @@ func setupGlobalMiddleware(handler http.Handler) http.Handler {
161162
// FileServerMiddleware serves files from the static folder
162163
func FileServerMiddleware(next http.Handler) http.Handler {
163164
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
165+
w.Header().Set("Server", "mcs/"+pkg.Version) // add HTTP Server header
164166
switch {
165167
case strings.HasPrefix(r.URL.Path, "/ws"):
166168
serveWS(w, r)

0 commit comments

Comments
 (0)