From aae170755da814f7ffd7a744090a37c64ca075cf Mon Sep 17 00:00:00 2001 From: Yusuke Kadowaki Date: Wed, 31 Jan 2024 13:09:51 +0900 Subject: [PATCH] Change lincense/gen/main.go to skip shebang (#2313) * Skip shebang * Apply format --- .devcontainer/postAttachCommand.sh | 20 +++++++++++++++++++- .github/workflows/issue-metrics.yaml | 15 +++++++++++++++ hack/license/gen/main.go | 3 ++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.devcontainer/postAttachCommand.sh b/.devcontainer/postAttachCommand.sh index b8fee321a4..2198678504 100644 --- a/.devcontainer/postAttachCommand.sh +++ b/.devcontainer/postAttachCommand.sh @@ -1,4 +1,22 @@ #!/bin/bash -eu + +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# 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 +# +# https://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. +# +: + # # This script is executed as postAttachCommand in devcontainer.json # This script does... @@ -6,7 +24,7 @@ # - add command history setting to .zshrc to persist history # -echo "creating symbolic link of config ZSHRC..." +echo "creating symbolic link of config..." LINK_TARGET="$(pwd)/cmd/agent/core/ngt/sample.yaml" LINK_SRC="/etc/server/config.yaml" diff --git a/.github/workflows/issue-metrics.yaml b/.github/workflows/issue-metrics.yaml index d79a13bf59..6c40415a2f 100644 --- a/.github/workflows/issue-metrics.yaml +++ b/.github/workflows/issue-metrics.yaml @@ -1,3 +1,18 @@ +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# 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 +# +# https://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. +# name: Monthly review time metrics on: workflow_dispatch: diff --git a/hack/license/gen/main.go b/hack/license/gen/main.go index 824c9ee7e1..e348675753 100644 --- a/hack/license/gen/main.go +++ b/hack/license/gen/main.go @@ -307,7 +307,8 @@ func readAndRewrite(path string) error { for sc.Scan() { line := sc.Text() if filepath.Ext(path) == ".go" && strings.HasPrefix(line, "//go:") || - filepath.Ext(path) == ".py" && strings.HasPrefix(line, "# -*-") { + filepath.Ext(path) == ".py" && strings.HasPrefix(line, "# -*-") || + filepath.Ext(path) == ".sh" && strings.HasPrefix(line, "#!") { bf = true _, err = buf.WriteString(line) if err != nil {