Skip to content

Commit

Permalink
Add shell script checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rseichter committed Feb 21, 2024
1 parent 784b60d commit 3c48810
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ The following make targets are available:
clean Cleanup build directories.
dist Build distribution files.
help Show this text.
push Push to all configured Git remotes.
pypi Upload distribution files to PyPI.
schk Shell script check.
stest Run sandboxed Python tests (disables network tests).
test Run all Python tests and generate coverage report.

Expand Down Expand Up @@ -43,3 +45,9 @@ stest:

test:
env NETWORK_TESTS=1 $(unittest) coverage

push:
for _r in $(shell git remote); do git push $$_r; done; unset _r

schk:
shellcheck -x contrib/*.sh
6 changes: 3 additions & 3 deletions contrib/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -euo pipefail

function usage() {
local bn
bn="$(basename $0)"
bn="$(basename "$0")"
echo "Usage: ${bn} {clean | dist | pypi}" >&2
echo " ${bn} setver {version}" >&2
exit 1
Expand Down Expand Up @@ -41,11 +41,11 @@ arg="${1}"
shift
case "${arg}" in
clean)
do_${arg}
do_"${arg}"
;;
dist|setver|pypi)
. .venv/bin/activate
do_${arg} "$@"
do_"${arg}" "$@"
;;
*)
usage
Expand Down
2 changes: 1 addition & 1 deletion contrib/unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONF='tests/tests.conf'
sed -i'' -e "s,^db_url.*,db_url = sqlite:///${DB}," $CONF

function usage() {
echo "Usage: $(basename $0) [coverage]" >&2
echo "Usage: $(basename "$0") [coverage]" >&2
exit 1
}

Expand Down

0 comments on commit 3c48810

Please sign in to comment.