From 6bd111e290abae1d9d1b1debe92fe9f7b564d56d Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Wed, 10 Jan 2018 13:14:47 -0800 Subject: [PATCH] *: unify all operators' versioning (#1848) --- cmd/backup-operator/main.go | 2 +- cmd/restore-operator/main.go | 2 +- hack/build/backup-operator/build | 2 +- hack/build/restore-operator/build | 2 +- version/backup-operator/version.go | 20 -------------------- version/restore-operator/version.go | 20 -------------------- 6 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 version/backup-operator/version.go delete mode 100644 version/restore-operator/version.go diff --git a/cmd/backup-operator/main.go b/cmd/backup-operator/main.go index 713d905bb..97a52da98 100644 --- a/cmd/backup-operator/main.go +++ b/cmd/backup-operator/main.go @@ -24,7 +24,7 @@ import ( controller "github.com/coreos/etcd-operator/pkg/controller/backup-operator" "github.com/coreos/etcd-operator/pkg/util/constants" "github.com/coreos/etcd-operator/pkg/util/k8sutil" - version "github.com/coreos/etcd-operator/version/backup-operator" + version "github.com/coreos/etcd-operator/version" "github.com/sirupsen/logrus" "k8s.io/api/core/v1" diff --git a/cmd/restore-operator/main.go b/cmd/restore-operator/main.go index a766e1cb6..e6af3d6d2 100644 --- a/cmd/restore-operator/main.go +++ b/cmd/restore-operator/main.go @@ -25,7 +25,7 @@ import ( controller "github.com/coreos/etcd-operator/pkg/controller/restore-operator" "github.com/coreos/etcd-operator/pkg/util/constants" "github.com/coreos/etcd-operator/pkg/util/k8sutil" - version "github.com/coreos/etcd-operator/version/restore-operator" + version "github.com/coreos/etcd-operator/version" "github.com/sirupsen/logrus" "k8s.io/api/core/v1" diff --git a/hack/build/backup-operator/build b/hack/build/backup-operator/build index a4392385a..a388c1352 100755 --- a/hack/build/backup-operator/build +++ b/hack/build/backup-operator/build @@ -15,7 +15,7 @@ fi GIT_SHA=`git rev-parse --short HEAD || echo "GitNotFound"` -gitHash="github.com/coreos/etcd-operator/version/backup-operator.GitSHA=${GIT_SHA}" +gitHash="github.com/coreos/etcd-operator/version.GitSHA=${GIT_SHA}" go_ldflags="-X ${gitHash}" diff --git a/hack/build/restore-operator/build b/hack/build/restore-operator/build index 31ac01f3b..7699cde50 100755 --- a/hack/build/restore-operator/build +++ b/hack/build/restore-operator/build @@ -15,7 +15,7 @@ fi GIT_SHA=`git rev-parse --short HEAD || echo "GitNotFound"` -gitHash="github.com/coreos/etcd-operator/version/restore-operator.GitSHA=${GIT_SHA}" +gitHash="github.com/coreos/etcd-operator/version.GitSHA=${GIT_SHA}" go_ldflags="-X ${gitHash}" diff --git a/version/backup-operator/version.go b/version/backup-operator/version.go deleted file mode 100644 index 461589415..000000000 --- a/version/backup-operator/version.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 The etcd-operator Authors -// -// 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. - -package version - -var ( - Version = "0.0.1+git" - GitSHA = "Not provided (use ./build instead of go build)" -) diff --git a/version/restore-operator/version.go b/version/restore-operator/version.go deleted file mode 100644 index 461589415..000000000 --- a/version/restore-operator/version.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 The etcd-operator Authors -// -// 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. - -package version - -var ( - Version = "0.0.1+git" - GitSHA = "Not provided (use ./build instead of go build)" -)