Skip to content

Commit a0b1a3c

Browse files
authored
#31: Setup shellcheck for the starter scripts (#103)
Co-author: @tkilias Fixes #31
1 parent 74c3496 commit a0b1a3c

29 files changed

+86
-24
lines changed

.github/workflows/shellcheck.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Check bash scripts
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
shellcheck:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Run shellcheck
11+
run: ./scripts/build/shellcheck.sh

doc/changes/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changes
22

3+
* [0.9.0](changes_0.9.0.md)
34
* [0.8.0](changes_0.8.0.md)
45
* [0.7.0](changes_0.7.0.md)
56
* [0.6.0](changes_0.6.0.md)

doc/changes/changes_0.9.0.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Script-Languages-Container-Tool 0.9.0, released t.b.d.
2+
3+
Code name: t.b.d.
4+
5+
## Summary
6+
7+
t.b.d.
8+
9+
## Features / Enhancements
10+
11+
- #31: Setup shellcheck for the starter scripts
12+
13+
## Bug Fixes
14+
15+
n/a
16+
17+
## Documentation
18+
n/a
19+

githooks/create_checksums.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ CHECKSUM_DIRECTORY="$PWD/checksums"
66
if [ ! -e "$CHECKSUM_DIRECTORY" ]; then
77
mkdir "$CHECKSUM_DIRECTORY"
88
fi
9-
find $PWD -maxdepth 1 -type f -printf "%f\\0" | xargs --null -n1 -I{} bash -c "sha512sum {} > '$CHECKSUM_DIRECTORY/{}.sha512sum'"
9+
find "$PWD" -maxdepth 1 -type f -printf "%f\\0" | xargs --null -n1 -I{} bash -c "sha512sum {} > '$CHECKSUM_DIRECTORY/{}.sha512sum'"

githooks/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ GITHOOKS_PATH="$(readlink -f "${GITHOOKS_PATH}")"
2626
copy_hook() {
2727
local SCRIPT_PATH="$SCRIPT_DIR/$1"
2828
local GITHOOK_PATH="$GITHOOKS_PATH/$2"
29-
local RELATIVE_PATH=$(realpath --relative-to="$GITHOOKS_PATH" "$SCRIPT_PATH")
29+
local RELATIVE_PATH=""
30+
RELATIVE_PATH=$(realpath --relative-to="$GITHOOKS_PATH" "$SCRIPT_PATH")
3031
pushd "$GITHOOKS_PATH" > /dev/null
3132
if [ -e "$GITHOOK_PATH" ] || [ -L "$GITHOOK_PATH" ]
3233
then

githooks/update_packaging.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ set -o pipefail
66
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
77

88
# define colors for use in output
9-
green='\033[0;32m'
109
no_color='\033[0m'
1110
grey='\033[0;90m'
1211

@@ -31,9 +30,9 @@ then
3130
fi
3231
poetry build > /dev/null
3332
pushd dist > /dev/null
34-
tar_file=$(ls *.tar.gz)
33+
tar_file=$(ls -- *.tar.gz)
3534
extracted_dir=${tar_file%.tar.gz}
36-
tar -xf $tar_file
35+
tar -xf "$tar_file"
3736
cp "$extracted_dir/setup.py" ../setup.py
3837
rm -r "$extracted_dir"
3938
popd > /dev/null
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
088853eea60a69592c4e5e0f3c811f60353dfebb4172313bdd01727cbc36f9ac8b6d555986d0cac0b32f1073cea3f0b6ff5ea26e0cf08052069b8e57467f5586 exaslct_install_template.sh
1+
d0a4303e68cff1d94ceb1568a167d978a3e3b6753334f15d1e5ba6788c97fb40ac0d3673de0b6f2b401c9c3656cc1ca35e586f0a4216c36200d45a21d1bdee22 exaslct_install_template.sh

installer/exaslct_install_template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ SCRIPT_DIR="$(dirname "$($rl -f "${BASH_SOURCE[0]}")")"
2121
EXASLCT_GIT_REF="<<<<EXASLCT_GIT_REF>>>>"
2222
RUNNER_IMAGE_NAME="$(bash "$SCRIPT_DIR/construct_docker_runner_image_name.sh" "$EXASLCT_GIT_REF")"
2323

24-
bash $SCRIPT_DIR/exaslct_within_docker_container_without_container_build.sh "$RUNNER_IMAGE_NAME" "${@}"
24+
bash "$SCRIPT_DIR/exaslct_within_docker_container_without_container_build.sh" "$RUNNER_IMAGE_NAME" "${@}"
2525

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "exasol-script-languages-container-tool"
3-
version = "0.8.0"
3+
version = "0.9.0"
44
description = "Script Languages Container Tool"
55

66
license = "MIT"

scripts/build/build_release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33

44
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
5-
5+
6+
#shellcheck source=./starter_scripts/poetry_utils.sh
67
source "$SCRIPT_DIR/../../starter_scripts/poetry_utils.sh"
78

89
check_requirements

0 commit comments

Comments
 (0)