forked from sig_core/toolkit
maybe shellcheck will work
This commit is contained in:
parent
e1ad10e1f4
commit
ad69c93623
22
.gitlab-ci.yml
Normal file
22
.gitlab-ci.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# you can delete this line if you're not using Docker
|
||||||
|
#image: busybox:latest
|
||||||
|
|
||||||
|
shellcheck:
|
||||||
|
stage: test
|
||||||
|
image: registry.gitlab.com/pipeline-components/shellcheck:latest
|
||||||
|
variables:
|
||||||
|
CUSTOM_ENV_CI_REGISTRY: git.rockylinux.org
|
||||||
|
CUSTOM_ENV_CI_REGISTRY_USER: neil
|
||||||
|
tags:
|
||||||
|
- container
|
||||||
|
script:
|
||||||
|
# anything ending on .sh, should be shell script
|
||||||
|
- |
|
||||||
|
find . -name .git -type d -prune -o -type f -name \*.sh -print0 |
|
||||||
|
xargs -0 -P $(nproc) -r -n1 shellcheck
|
||||||
|
# magic, any file with a valid shebang should be scanned aswell
|
||||||
|
- |
|
||||||
|
find . -name .git -type d -prune -o -type f -regex '.*/[^.]*$' -print0 |
|
||||||
|
xargs -0 -P $(nproc) -r -n1 sh -c 'FILE="$0"; if head -n1 "$FILE" |grep -q "^#\\! \?/.\+\(ba|d|k\)\?sh" ; then shellcheck "$FILE" ; else /bin/true ; fi '
|
||||||
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Source mangle vars
|
# Source mangle vars
|
||||||
# shellcheck source=./common
|
# shellcheck source=./common.sh
|
||||||
source "$(dirname "$0")/common"
|
source "$(dirname "$0")/common.sh"
|
||||||
# Source sync / migrate vars for repository information
|
# Source sync / migrate vars for repository information
|
||||||
# shellcheck source=../sync/common
|
# shellcheck source=../sync/common.sh
|
||||||
source "$(dirname "$0")/../sync/common"
|
source "$(dirname "$0")/../sync/common.sh"
|
||||||
|
|
||||||
# How many
|
# How many
|
||||||
ARG1=${1}
|
ARG1=${1}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# other scripts in this directory to assist.
|
# other scripts in this directory to assist.
|
||||||
# Source common variables
|
# Source common variables
|
||||||
# shellcheck disable=SC2046,1091,1090
|
# shellcheck disable=SC2046,1091,1090
|
||||||
source $(dirname "$0")/common
|
source $(dirname "$0")/common.sh
|
||||||
|
|
||||||
# sync all pieces of a release, including extras, nfv, etc
|
# sync all pieces of a release, including extras, nfv, etc
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
# Source common variables
|
# Source common variables
|
||||||
# shellcheck disable=SC2046,1091,1090
|
# shellcheck disable=SC2046,1091,1090
|
||||||
source "$(dirname "$0")/common"
|
source "$(dirname "$0")/common.sh"
|
||||||
|
|
||||||
echo "** Updating source repos"
|
echo "** Updating source repos"
|
||||||
for y in "${ALL_REPOS[@]}"; do
|
for y in "${ALL_REPOS[@]}"; do
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# Source common variables
|
# Source common variables
|
||||||
# shellcheck disable=SC2046,1091,1090
|
# shellcheck disable=SC2046,1091,1090
|
||||||
source "$(dirname "$0")/common"
|
source "$(dirname "$0")/common.sh"
|
||||||
|
|
||||||
REV=${1}
|
REV=${1}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Source common variables
|
# Source common variables
|
||||||
# shellcheck disable=SC2046,1091,1090
|
# shellcheck disable=SC2046,1091,1090
|
||||||
source "$(dirname "$0")/common"
|
source "$(dirname "$0")/common.sh"
|
||||||
|
|
||||||
# Major Version (eg, 8)
|
# Major Version (eg, 8)
|
||||||
MAJ=${1}
|
MAJ=${1}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Source common variables
|
# Source common variables
|
||||||
# shellcheck disable=SC2046,1091,1090
|
# shellcheck disable=SC2046,1091,1090
|
||||||
source "$(dirname "$0")/common"
|
source "$(dirname "$0")/common.sh"
|
||||||
|
|
||||||
# Major Version (eg, 8)
|
# Major Version (eg, 8)
|
||||||
MAJ=${1}
|
MAJ=${1}
|
||||||
|
Loading…
Reference in New Issue
Block a user