Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-16898 cq: support user bash in githooks #15648

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion utils/githooks/find_base.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# /*
# * (C) Copyright 2024 Intel Corporation.
# *
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/git-version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

VERSION=$(git --version | sed -ne 's/^[^0-9]*\([[0-9\.]*\).*/\1/p')
if [ -z "$VERSION" ]; then
Expand Down
3 changes: 2 additions & 1 deletion utils/githooks/hook_base.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2024 Intel Corporation.
#
Expand Down Expand Up @@ -31,6 +31,7 @@ export -f _git_diff_cached_files
hook=${0##*/}
rm -f ".${hook}"

skip_list=()
IFS=', ' read -r -a skip_list <<< "${DAOS_GITHOOK_SKIP:-}"

run-parts() {
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu

. utils/githooks/hook_base.sh
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/10-update-copyright.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2022-2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/20-codespell.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/30-Jenkinsfile.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2023-2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/40-yamllint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2022-2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/50-clang-format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2022-2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/60-gofmt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2022-2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/70-isort.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2023-2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/71-flake.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2022-2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/72-pylint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2022-2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/pre-commit.d/73-ftest.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2024 Intel Corporation.
#
Expand Down
2 changes: 1 addition & 1 deletion utils/githooks/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

. utils/githooks/hook_base.sh
2 changes: 1 addition & 1 deletion utils/rpms/packaging/get_release_branch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# find the base branch of the current branch
# base branches can be master, release/2.4+, release/3+
Expand Down
Loading