Skip to content

Commit a2a09b8

Browse files
authored
Upgrade to Go 1.16. Remove Go-Bind-assets in favor of embed. (minio#630)
* Upgrade to Go 1.16. Remove Go-Bind-assets in favor of embed. Checking Portal-UI Build folder. * lint * Remove assets references * Fixes for sub fs * Fix lint
1 parent 716aabe commit a2a09b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+704
-1560
lines changed

.github/workflows/go.yml

+1-1
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.15.x, 1.16.x]
17+
go-version: [1.16.x]
1818
os: [ubuntu-latest]
1919
steps:
2020
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dist/
2727
# Ignore node_modules
2828

2929
portal-ui/node_modules/
30-
portal-ui/build/
3130

3231
# Ignore tls cert and key
3332
private.key

CREDITS

+22-51
Original file line numberDiff line numberDiff line change
@@ -2836,35 +2836,6 @@ Everyone is permitted to copy and distribute copies of this Agreement, but in or
28362836
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
28372837
================================================================
28382838

2839-
github.com/elazarl/go-bindata-assetfs
2840-
https://github.com/elazarl/go-bindata-assetfs
2841-
----------------------------------------------------------------
2842-
Copyright (c) 2014, Elazar Leibovich
2843-
All rights reserved.
2844-
2845-
Redistribution and use in source and binary forms, with or without
2846-
modification, are permitted provided that the following conditions are met:
2847-
2848-
* Redistributions of source code must retain the above copyright notice, this
2849-
list of conditions and the following disclaimer.
2850-
2851-
* Redistributions in binary form must reproduce the above copyright notice,
2852-
this list of conditions and the following disclaimer in the documentation
2853-
and/or other materials provided with the distribution.
2854-
2855-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2856-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2857-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2858-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
2859-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2860-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2861-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2862-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2863-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2864-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2865-
2866-
================================================================
2867-
28682839
github.com/evanphx/json-patch
28692840
https://github.com/evanphx/json-patch
28702841
----------------------------------------------------------------
@@ -13173,28 +13144,28 @@ SOFTWARE.
1317313144
github.com/klauspost/readahead
1317413145
https://github.com/klauspost/readahead
1317513146
----------------------------------------------------------------
13176-
The MIT License (MIT)
13177-
13178-
Copyright (c) 2015 Klaus Post
13179-
13180-
Permission is hereby granted, free of charge, to any person obtaining a copy
13181-
of this software and associated documentation files (the "Software"), to deal
13182-
in the Software without restriction, including without limitation the rights
13183-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13184-
copies of the Software, and to permit persons to whom the Software is
13185-
furnished to do so, subject to the following conditions:
13186-
13187-
The above copyright notice and this permission notice shall be included in all
13188-
copies or substantial portions of the Software.
13189-
13190-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13191-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13192-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13193-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
13194-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
13195-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
13196-
SOFTWARE.
13197-
13147+
The MIT License (MIT)
13148+
13149+
Copyright (c) 2015 Klaus Post
13150+
13151+
Permission is hereby granted, free of charge, to any person obtaining a copy
13152+
of this software and associated documentation files (the "Software"), to deal
13153+
in the Software without restriction, including without limitation the rights
13154+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13155+
copies of the Software, and to permit persons to whom the Software is
13156+
furnished to do so, subject to the following conditions:
13157+
13158+
The above copyright notice and this permission notice shall be included in all
13159+
copies or substantial portions of the Software.
13160+
13161+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13162+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13163+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13164+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
13165+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
13166+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
13167+
SOFTWARE.
13168+
1319813169

1319913170
================================================================
1320013171

Dockerfile

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
FROM golang:1.15 as binlayer
2-
3-
RUN go get github.com/go-bindata/go-bindata/... && go get github.com/elazarl/go-bindata-assetfs/...
4-
51
FROM node:10 as uilayer
62

73
WORKDIR /app
84

9-
COPY --from=binlayer /go/bin/go-bindata-assetfs /bin/
10-
COPY --from=binlayer /go/bin/go-bindata /bin/
11-
125
COPY ./portal-ui/package.json ./
136
COPY ./portal-ui/yarn.lock ./
147
RUN yarn install
@@ -19,7 +12,7 @@ RUN yarn install && make build-static
1912

2013
USER node
2114

22-
FROM golang:1.15 as golayer
15+
FROM golang:1.16 as golayer
2316

2417
RUN apt-get update -y && apt-get install -y ca-certificates
2518

@@ -33,8 +26,6 @@ RUN go mod download
3326
ADD . /go/src/github.com/minio/console/
3427
WORKDIR /go/src/github.com/minio/console/
3528

36-
COPY --from=uilayer /app/bindata_assetfs.go /go/src/github.com/minio/console/portal-ui/bindata_assetfs.go
37-
3829
ENV CGO_ENABLED=0
3930

4031
RUN go build -ldflags "-w -s" -a -o console ./cmd/console

Dockerfile.assets

-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
FROM golang:1.15 as binlayer
2-
3-
RUN go get github.com/go-bindata/go-bindata/... && go get github.com/elazarl/go-bindata-assetfs/...
4-
51
FROM node:10 as uilayer
62

73
WORKDIR /app
84

9-
COPY --from=binlayer /go/bin/go-bindata-assetfs /bin/
10-
COPY --from=binlayer /go/bin/go-bindata /bin/
11-
125
COPY ./portal-ui/package.json ./
136
COPY ./portal-ui/yarn.lock ./
147
RUN yarn install

go.mod

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
module github.com/minio/console
22

3-
go 1.15
3+
go 1.16
44

55
require (
66
github.com/blang/semver/v4 v4.0.0
77
github.com/cheggaaa/pb/v3 v3.0.6
88
github.com/coreos/go-oidc v2.2.1+incompatible
9-
github.com/elazarl/go-bindata-assetfs v1.0.0
109
github.com/go-openapi/errors v0.19.6
1110
github.com/go-openapi/loads v0.19.5
1211
github.com/go-openapi/runtime v0.19.19

0 commit comments

Comments
 (0)