mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2025-01-09 16:55:17 -07:00
fix(issue): fix shell issue which ware found by shellcheck
This commit is contained in:
parent
e19896e3a0
commit
48f3917716
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh -l
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC3060
|
||||
|
||||
set -e # if a command fails it stops the execution
|
||||
set -u # script fails if trying to access to an undefined variable
|
||||
|
||||
echo "[+] Action start"
|
||||
SOURCE_BEFORE_DIRECTORY="${1}"
|
||||
SOURCE_DIRECTORY="${2}"
|
||||
DESTINATION_GITHUB_USERNAME="${3}"
|
||||
DESTINATION_REPOSITORY_NAME="${4}"
|
||||
|
|
10
validate.sh
10
validate.sh
|
@ -1,11 +1,13 @@
|
|||
#!/bin/sh -l
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2044
|
||||
|
||||
set -euo pipefile
|
||||
set -eu pipefile
|
||||
|
||||
rc=0
|
||||
for filename in $(find ./* -name '*.sh'); do
|
||||
echo "Validating"
|
||||
echo "Start to validating ${filename}"
|
||||
shellcheck "${filename}" || exit $?
|
||||
echo "🚀Successfully Validated ${filename}"
|
||||
done
|
||||
|
||||
exit $?
|
||||
exit $rc
|
Loading…
Reference in New Issue
Block a user