mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 13:06:14 +01:00
Merge branch 'py-sh-check-fixes' into 'master'
shellcheck fixes See merge request GNOME/glib!1756
This commit is contained in:
commit
a7c0adbe11
@ -40,29 +40,6 @@ variables:
|
|||||||
only:
|
only:
|
||||||
- schedules
|
- schedules
|
||||||
|
|
||||||
sh-check:
|
|
||||||
extends: .only-default
|
|
||||||
image: $DEBIAN_IMAGE
|
|
||||||
stage: style-check
|
|
||||||
allow_failure: true
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/run-shellcheck.sh
|
|
||||||
only:
|
|
||||||
changes:
|
|
||||||
- "**/*.sh"
|
|
||||||
|
|
||||||
py-check:
|
|
||||||
extends: .only-default
|
|
||||||
image: $DEBIAN_IMAGE
|
|
||||||
stage: style-check
|
|
||||||
allow_failure: true
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/run-black.sh
|
|
||||||
- .gitlab-ci/run-flake8.sh
|
|
||||||
only:
|
|
||||||
changes:
|
|
||||||
- "**/*.py"
|
|
||||||
|
|
||||||
style-check-diff:
|
style-check-diff:
|
||||||
extends: .only-default
|
extends: .only-default
|
||||||
image: $DEBIAN_IMAGE
|
image: $DEBIAN_IMAGE
|
||||||
@ -70,6 +47,9 @@ style-check-diff:
|
|||||||
allow_failure: true
|
allow_failure: true
|
||||||
script:
|
script:
|
||||||
- .gitlab-ci/run-style-check-diff.sh
|
- .gitlab-ci/run-style-check-diff.sh
|
||||||
|
- .gitlab-ci/run-shellcheck.sh
|
||||||
|
- .gitlab-ci/run-black.sh
|
||||||
|
- .gitlab-ci/run-flake8.sh
|
||||||
|
|
||||||
check-todos:
|
check-todos:
|
||||||
extends: .only-default
|
extends: .only-default
|
||||||
|
@ -46,7 +46,7 @@ while (($# > 0)); do
|
|||||||
--base|-b) read_arg base "$@" || shift;;
|
--base|-b) read_arg base "$@" || shift;;
|
||||||
--base-version) read_arg base_version "$@" || shift;;
|
--base-version) read_arg base_version "$@" || shift;;
|
||||||
--no-login) no_login=1;;
|
--no-login) no_login=1;;
|
||||||
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
|
*) echo -e "\\e[1;31mERROR\\e[0m: Unknown option '$1'"; exit 1;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
@ -75,7 +75,7 @@ if [ $list == 1 ]; then
|
|||||||
filename=$( basename -- "$f" )
|
filename=$( basename -- "$f" )
|
||||||
basename="${filename%.*}"
|
basename="${filename%.*}"
|
||||||
|
|
||||||
echo -e " \e[1;39m$basename\e[0m"
|
echo -e " \\e[1;39m$basename\\e[0m"
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -87,7 +87,7 @@ if [ -z "${base}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$base.Dockerfile" ]; then
|
if [ ! -f "$base.Dockerfile" ]; then
|
||||||
echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
|
echo -e "\\e[1;31mERROR\\e[0m: Dockerfile for '$base' not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ fi
|
|||||||
TAG="registry.gitlab.gnome.org/gnome/glib/${base}:${base_version}"
|
TAG="registry.gitlab.gnome.org/gnome/glib/${base}:${base_version}"
|
||||||
|
|
||||||
if [ $build == 1 ]; then
|
if [ $build == 1 ]; then
|
||||||
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
|
echo -e "\\e[1;32mBUILDING\\e[0m: ${base} as ${TAG}"
|
||||||
$SUDO_CMD docker build \
|
$SUDO_CMD docker build \
|
||||||
--build-arg HOST_USER_ID="$UID" \
|
--build-arg HOST_USER_ID="$UID" \
|
||||||
--build-arg COVERITY_SCAN_PROJECT_NAME="${COVERITY_SCAN_PROJECT_NAME}" \
|
--build-arg COVERITY_SCAN_PROJECT_NAME="${COVERITY_SCAN_PROJECT_NAME}" \
|
||||||
@ -111,7 +111,7 @@ if [ $build == 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $push == 1 ]; then
|
if [ $push == 1 ]; then
|
||||||
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
|
echo -e "\\e[1;32mPUSHING\\e[0m: ${base} as ${TAG}"
|
||||||
|
|
||||||
if [ $no_login == 0 ]; then
|
if [ $no_login == 0 ]; then
|
||||||
$SUDO_CMD docker login registry.gitlab.gnome.org
|
$SUDO_CMD docker login registry.gitlab.gnome.org
|
||||||
@ -122,7 +122,7 @@ if [ $push == 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $run == 1 ]; then
|
if [ $run == 1 ]; then
|
||||||
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
|
echo -e "\\e[1;32mRUNNING\\e[0m: ${base} as ${TAG}"
|
||||||
$SUDO_CMD docker run \
|
$SUDO_CMD docker run \
|
||||||
--rm \
|
--rm \
|
||||||
--volume "$(pwd)/..:/home/user/app" \
|
--volume "$(pwd)/..:/home/user/app" \
|
||||||
|
@ -43,7 +43,8 @@ cd pcre
|
|||||||
# the file and then distribute it with GRegex.
|
# the file and then distribute it with GRegex.
|
||||||
echo "Generating pcre_chartables.c"
|
echo "Generating pcre_chartables.c"
|
||||||
cp -R "${PCRE}" tmp-build
|
cp -R "${PCRE}" tmp-build
|
||||||
cd tmp-build
|
(
|
||||||
|
cd tmp-build || exit 1
|
||||||
./configure --enable-utf8 --enable-unicode-properties --disable-cpp > /dev/null
|
./configure --enable-utf8 --enable-unicode-properties --disable-cpp > /dev/null
|
||||||
make pcre_chartables.c > /dev/null
|
make pcre_chartables.c > /dev/null
|
||||||
cat > ../pcre_chartables.c << \EOF
|
cat > ../pcre_chartables.c << \EOF
|
||||||
@ -52,7 +53,7 @@ cat > ../pcre_chartables.c << \EOF
|
|||||||
*/
|
*/
|
||||||
EOF
|
EOF
|
||||||
cat pcre_chartables.c >> ../pcre_chartables.c
|
cat pcre_chartables.c >> ../pcre_chartables.c
|
||||||
cd ..
|
)
|
||||||
rm -R tmp-build
|
rm -R tmp-build
|
||||||
|
|
||||||
# Compiled C files.
|
# Compiled C files.
|
||||||
|
Loading…
Reference in New Issue
Block a user