From f2f6ca24010c5cee838083342d235e5b39853f14 Mon Sep 17 00:00:00 2001 From: Spolti Date: Wed, 15 Nov 2023 14:19:37 -0300 Subject: [PATCH] review suggestions Signed-off-by: Spolti --- Dockerfile | 3 ++- go.sum | 2 ++ scripts/fmt.sh | 6 ------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index bcf909c..98de88f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,6 +94,7 @@ RUN true \ COPY .pre-commit-config.yaml ./ RUN git init && \ pre-commit install-hooks && \ + git config --global --add safe.directory "*" && \ rm -rf .git # Download dependencies before copying the source so they will be cached @@ -127,7 +128,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ GOARCH=${TARGETARCH:-amd64} \ CGO_ENABLED=0 \ GO111MODULE=on \ - go mod tidy && go build -a -o /go/bin/server ./proxy/ + go build -a -o /go/bin/server ./proxy/ ############################################################################### diff --git a/go.sum b/go.sum index 320d40e..3897e4f 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,7 @@ github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -116,6 +117,7 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I= k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg= k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= diff --git a/scripts/fmt.sh b/scripts/fmt.sh index cdbc0ed..624e566 100755 --- a/scripts/fmt.sh +++ b/scripts/fmt.sh @@ -13,12 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License.# -# Fix: 'fatal: detected dubious ownership in repository', -# only do this if it is running into the develop image -if [ "${PWD}" == "/opt/app" ]; then - git config --global --add safe.directory "*" -fi - pre-commit run --all-files RETURN_CODE=$? ## cat this file for helping on identifying the root cause when some issue happens