diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef8c0e6..6274f43 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,6 +11,12 @@ repos: hooks: - id: rapids-dependency-file-generator args: ["--clean"] + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + args: ["--severity=warning"] + files: ^ci/ default_language_version: python: python3 diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 944fec5..e65a950 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -16,16 +16,17 @@ rapids-dependency-file-generator \ rapids-mamba-retry env create --yes -f env.yaml -n docs conda activate docs -export RAPIDS_DOCS_DIR="$(mktemp -d)" +RAPIDS_DOCS_DIR="$(mktemp -d)" +export RAPIDS_DOCS_DIR rapids-print-env -PROJ_LIST=("libcugraph libwholegraph") +PROJ_LIST=("libcugraph" "libwholegraph") -for PROJECT in ${PROJ_LIST}; do +for PROJECT in "${PROJ_LIST[@]}"; do rapids-logger "Download ${PROJECT} xml_tar" TMP_DIR=$(mktemp -d) - export XML_DIR_${PROJECT^^}="$TMP_DIR" + export "XML_DIR_${PROJECT^^}"="$TMP_DIR" curl "https://d1664dvumjb44w.cloudfront.net/${PROJECT}/xml_tar/${RAPIDS_VERSION_MAJOR_MINOR}/xml.tar.gz" | tar -xzf - -C "${TMP_DIR}" done diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 1c618d1..9fb939b 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -21,21 +21,17 @@ NEXT_FULL_TAG=$1 # Get current version CURRENT_TAG=$(git tag --merged HEAD | grep -xE '^v.*' | sort --version-sort | tail -n 1 | tr -d 'v') -CURRENT_MAJOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[1]}') -CURRENT_MINOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[2]}') -CURRENT_PATCH=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[3]}') -CURRENT_SHORT_TAG=${CURRENT_MAJOR}.${CURRENT_MINOR} #Get . for next version -NEXT_MAJOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[1]}') -NEXT_MINOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[2]}') +NEXT_MAJOR=$(echo "$NEXT_FULL_TAG" | awk '{split($0, a, "."); print a[1]}') +NEXT_MINOR=$(echo "$NEXT_FULL_TAG" | awk '{split($0, a, "."); print a[2]}') NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR} echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG" # Inplace sed replace; workaround for Linux and Mac function sed_runner() { - sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak + sed -i.bak ''"$1"'' "$2" && rm -f "${2}".bak } # Centralized version file update