diff --git a/Makefile b/Makefile index 4b648426..363a1fde 100644 --- a/Makefile +++ b/Makefile @@ -81,6 +81,7 @@ fmt: vet: go vet ./... ./hack/go-lint.sh + ./hack/generate-toc.sh # Generate code generate: controller-gen diff --git a/README.md b/README.md index bd853454..4b51655c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ Table of Contents ================= + + * [Table of Contents](#table-of-contents) * [Nexus Operator](#nexus-operator) * [Pre Requisites](#pre-requisites) * [Quick Install](#quick-install) @@ -19,7 +21,7 @@ Table of Contents * [Use NodePort](#use-nodeport) * [Network on OpenShift](#network-on-openshift) * [Network on Kubernetes 1.14 ](#network-on-kubernetes-114) - * [NGINX Ingress troubleshooting](#nginx-ingress-troubleshooting) + * [NGINX Ingress troubleshooting](#nginx-ingress-troubleshooting) * [TLS/SSL](#tlsssl) * [Persistence](#persistence) * [Minikube](#minikube) @@ -30,6 +32,10 @@ Table of Contents * [Repositories Auto Creation](#repositories-auto-creation) * [Contributing](#contributing) + + + + # Nexus Operator A Nexus OSS Kubernetes Operator based on the [Operator SDK](https://github.com/operator-framework/operator-sdk). diff --git a/hack/generate-toc.sh b/hack/generate-toc.sh new file mode 100755 index 00000000..fda8b129 --- /dev/null +++ b/hack/generate-toc.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2020 Nexus Operator and/or its 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. + + +command -v bin/gh-md-toc > /dev/null || curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o bin/gh-md-toc && chmod +x bin/gh-md-toc + +bin/gh-md-toc --no-backup README.md +sed -i '/^