From 2e081efc69e16fe97ad09341d884f0e574b1646a Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 21 Aug 2019 16:30:41 -0700 Subject: [PATCH] change build tag --- go.mod | 2 +- go.sum | 4 ++-- handler/api/badge/status.go | 2 -- handler/api/badge/status_oss.go | 37 --------------------------------- service/token/renew.go | 2 -- service/token/renew_oss.go | 37 --------------------------------- 6 files changed, 3 insertions(+), 81 deletions(-) delete mode 100644 handler/api/badge/status_oss.go delete mode 100644 service/token/renew_oss.go diff --git a/go.mod b/go.mod index 548fb3a9..64a69da6 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/docker/go-units v0.3.3 github.com/drone/drone-go v1.0.5 github.com/drone/drone-runtime v1.1.0 - github.com/drone/drone-ui v0.0.0-20190820205843-4794a1d4ea32 + github.com/drone/drone-ui v0.0.0-20190821232913-65807c0b23a3 github.com/drone/drone-yaml v1.2.3-0.20190807054305-a4a63fe917cb github.com/drone/envsubst v1.0.1 github.com/drone/go-license v1.0.2 diff --git a/go.sum b/go.sum index 4dcec636..a6069972 100644 --- a/go.sum +++ b/go.sum @@ -73,6 +73,8 @@ github.com/drone/drone-ui v0.0.0-20190820204852-c1b9c74995f2 h1:l0TUsupV8IfjzeTM github.com/drone/drone-ui v0.0.0-20190820204852-c1b9c74995f2/go.mod h1:NBtVWW7NNJpD9+huMD/5TAE1db2nrEh0i35/9Rf1MPI= github.com/drone/drone-ui v0.0.0-20190820205843-4794a1d4ea32 h1:C9ndP76/qb8m/7jDnxfysb7qtI02mZuiD0pthUxBUAI= github.com/drone/drone-ui v0.0.0-20190820205843-4794a1d4ea32/go.mod h1:NBtVWW7NNJpD9+huMD/5TAE1db2nrEh0i35/9Rf1MPI= +github.com/drone/drone-ui v0.0.0-20190821232913-65807c0b23a3 h1:imiIbuxHbMjvN1r2MrpP0NXHyPMPxWKxV0xqK/Fx0z8= +github.com/drone/drone-ui v0.0.0-20190821232913-65807c0b23a3/go.mod h1:NBtVWW7NNJpD9+huMD/5TAE1db2nrEh0i35/9Rf1MPI= github.com/drone/drone-ui v0.8.1 h1:I4WBAlnk/YQzCggQy/Qegb8Nu2T2R9KVzxso/lL98so= github.com/drone/drone-yaml v1.0.4 h1:NYTEGhf/XJMiJT8CwGy+pMOxWC8C2vhhzEo6/gbT4tU= github.com/drone/drone-yaml v1.0.4/go.mod h1:eM365p3g9M5sroFBTR/najiGrZnd/GiIpWHC2UW8PoI= @@ -190,8 +192,6 @@ github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uP github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-retryablehttp v0.0.0-20180718195005-e651d75abec6 h1:qCv4319q2q7XKn0MQbi8p37hsJ+9Xo8e6yojA73JVxk= github.com/hashicorp/go-retryablehttp v0.0.0-20180718195005-e651d75abec6/go.mod h1:fXcdFsQoipQa7mwORhKad5jmDCeSy/RCGzWA08PO0lM= -github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/nomad v0.0.0-20190125003214-134391155854 h1:L7WhLZt2ory/kQWxqkMwOiBpIoa4BWoadN7yx8LHEtk= diff --git a/handler/api/badge/status.go b/handler/api/badge/status.go index db395635..79ad32f0 100644 --- a/handler/api/badge/status.go +++ b/handler/api/badge/status.go @@ -2,8 +2,6 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package badge import ( diff --git a/handler/api/badge/status_oss.go b/handler/api/badge/status_oss.go deleted file mode 100644 index 2bde2dc0..00000000 --- a/handler/api/badge/status_oss.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2019 Drone IO, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build oss - -package badge - -import ( - "io" - "net/http" - "time" - - "github.com/drone/drone/core" -) - -// Handler returns a no-op http.HandlerFunc. -func Handler(core.RepositoryStore, core.BuildStore) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate, value") - w.Header().Set("Expires", "Thu, 01 Jan 1970 00:00:00 GMT") - w.Header().Set("Last-Modified", time.Now().UTC().Format(http.TimeFormat)) - w.Header().Set("Content-Type", "image/svg+xml") - io.WriteString(w, badgeNone) - } -} diff --git a/service/token/renew.go b/service/token/renew.go index 0b402ddd..7ae702ff 100644 --- a/service/token/renew.go +++ b/service/token/renew.go @@ -2,8 +2,6 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package token import ( diff --git a/service/token/renew_oss.go b/service/token/renew_oss.go deleted file mode 100644 index 660ce029..00000000 --- a/service/token/renew_oss.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2019 Drone IO, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build oss - -package token - -import ( - "context" - - "github.com/drone/drone/core" - - "github.com/drone/go-scm/scm/transport/oauth2" -) - -type renewer struct { -} - -// Renewer returns a new Renewer. -func Renewer(refresh *oauth2.Refresher, store core.UserStore) core.Renewer { - return &renewer{} -} - -func (r *renewer) Renew(ctx context.Context, user *core.User, force bool) error { - return nil // no-op -}