From 19a7521ecd50c706ee73e585ae7c33c9090130c0 Mon Sep 17 00:00:00 2001 From: Austin Vazquez Date: Fri, 6 Oct 2023 16:14:55 +0000 Subject: [PATCH] Update scripts with minor changes This changeset adds consistent naming to shell scripts, adds copyrights to benchmark scripts, and changes shebangs to env bash to work in environments when bash is not under `/bin/`. Signed-off-by: Austin Vazquez --- .github/workflows/benchmark_visualization.yml | 6 +++--- scripts/add-ltag.sh | 2 +- ...licenses.sh => build-third-party-licenses.sh} | 2 +- scripts/bump-deps.sh | 2 +- scripts/check-all.sh | 2 +- scripts/check-dco.sh | 2 +- scripts/check-flatc.sh | 2 +- scripts/check-lint.sh | 2 +- scripts/check-ltag.sh | 2 +- .../{check_regression.sh => check-regression.sh} | 16 +++++++++++++++- scripts/install-check-tools.sh | 2 +- scripts/install-dep.sh | 2 +- ...verter.sh => visualization-data-converter.sh} | 16 +++++++++++++++- 13 files changed, 43 insertions(+), 15 deletions(-) rename scripts/{build_third_party_licenses.sh => build-third-party-licenses.sh} (98%) rename scripts/{check_regression.sh => check-regression.sh} (84%) rename scripts/{visualization_data_converter.sh => visualization-data-converter.sh} (75%) diff --git a/.github/workflows/benchmark_visualization.yml b/.github/workflows/benchmark_visualization.yml index 5da5bade0..94e71a4ee 100644 --- a/.github/workflows/benchmark_visualization.yml +++ b/.github/workflows/benchmark_visualization.yml @@ -46,10 +46,10 @@ jobs: path: ${{github.workspace}} - name: Make temporary folder run: mkdir ${{github.workspace}}/current - - name: Change permission of visualization_data_converter.sh - run: chmod +x ${{github.workspace}}/scripts/visualization_data_converter.sh + - name: Change permission of visualization-data-converter.sh + run: chmod +x ${{github.workspace}}/scripts/visualization-data-converter.sh - name: Convert benchmark result to visualization data - run: ${{github.workspace}}/scripts/visualization_data_converter.sh ${{github.workspace}}/results.json ${{github.workspace}}/current + run: ${{github.workspace}}/scripts/visualization-data-converter.sh ${{github.workspace}}/results.json ${{github.workspace}}/current - name: Build matrix of filepaths id: set-matrix # Create a JSON array with the file paths and store it in the 'files' output diff --git a/scripts/add-ltag.sh b/scripts/add-ltag.sh index 8e494530f..1acd0d202 100755 --- a/scripts/add-ltag.sh +++ b/scripts/add-ltag.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/build_third_party_licenses.sh b/scripts/build-third-party-licenses.sh similarity index 98% rename from scripts/build_third_party_licenses.sh rename to scripts/build-third-party-licenses.sh index c6447a15e..bfb0ddc9a 100755 --- a/scripts/build_third_party_licenses.sh +++ b/scripts/build-third-party-licenses.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/bump-deps.sh b/scripts/bump-deps.sh index 228e87b6b..f44ec964b 100755 --- a/scripts/bump-deps.sh +++ b/scripts/bump-deps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/check-all.sh b/scripts/check-all.sh index 1a6305a73..454957226 100755 --- a/scripts/check-all.sh +++ b/scripts/check-all.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/check-dco.sh b/scripts/check-dco.sh index dbbdca194..05b7e45eb 100755 --- a/scripts/check-dco.sh +++ b/scripts/check-dco.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/check-flatc.sh b/scripts/check-flatc.sh index db0ee07ff..64f037255 100755 --- a/scripts/check-flatc.sh +++ b/scripts/check-flatc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/check-lint.sh b/scripts/check-lint.sh index bfc15d1fe..048d08dbc 100755 --- a/scripts/check-lint.sh +++ b/scripts/check-lint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/check-ltag.sh b/scripts/check-ltag.sh index 19bb14937..91855c11c 100755 --- a/scripts/check-ltag.sh +++ b/scripts/check-ltag.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/check_regression.sh b/scripts/check-regression.sh similarity index 84% rename from scripts/check_regression.sh rename to scripts/check-regression.sh index 857d468b0..113ce8bcd 100755 --- a/scripts/check_regression.sh +++ b/scripts/check-regression.sh @@ -1,4 +1,18 @@ -#!/bin/bash +#!/usr/bin/env bash + +# Copyright The Soci Snapshotter 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. set -eu -o pipefail diff --git a/scripts/install-check-tools.sh b/scripts/install-check-tools.sh index 6b6538594..da54527bf 100755 --- a/scripts/install-check-tools.sh +++ b/scripts/install-check-tools.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/install-dep.sh b/scripts/install-dep.sh index 92fbbbbaa..f963d7553 100755 --- a/scripts/install-dep.sh +++ b/scripts/install-dep.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright The containerd Authors. diff --git a/scripts/visualization_data_converter.sh b/scripts/visualization-data-converter.sh similarity index 75% rename from scripts/visualization_data_converter.sh rename to scripts/visualization-data-converter.sh index 033b26097..5ce33ebf1 100755 --- a/scripts/visualization_data_converter.sh +++ b/scripts/visualization-data-converter.sh @@ -1,4 +1,18 @@ -#!/bin/bash +#!/usr/bin/env bash + +# Copyright The Soci Snapshotter 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. set -eux -o pipefail