Skip to content

Commit

Permalink
Change lincense/gen/main.go to skip shebang (#2313)
Browse files Browse the repository at this point in the history
* Skip shebang

* Apply format
  • Loading branch information
ykadowak authored Jan 31, 2024
1 parent b3958f4 commit aae1707
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .devcontainer/postAttachCommand.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
#!/bin/bash -eu

#
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
#
# 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...
# - create symbolic link of config.yaml for easier development
# - 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"
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/issue-metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
#
# 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:
Expand Down
3 changes: 2 additions & 1 deletion hack/license/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit aae1707

Please sign in to comment.