diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..6d7240c92 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Ignore IntelliJ project files +.idea/ +*.iml + +# Ignore Python cache files after running tests +*/__pycache__/ diff --git a/push-to-gcs.sh b/push-to-gcs.sh index 76edf5330..9e4b2f5ca 100755 --- a/push-to-gcs.sh +++ b/push-to-gcs.sh @@ -11,9 +11,9 @@ set -euo pipefail [[ $# -eq 2 ]] || { - echo "Usage: ./push-to-gcs.sh " - echo "Example: ./push-to-gcs.sh cbde05 kafka" - exit 1 + echo "Usage: ./push-to-gcs.sh " + echo "Example: ./push-to-gcs.sh cbde05 kafka" + exit 1 } set -x @@ -43,14 +43,14 @@ if [[ ! -d "${MODULE}" ]]; then fi # Verify shell scripts have permission mode 75x. -for file in ${MODULE}/*.sh; do - if [[ "$(stat -c '%a' ${file})" != 75* ]]; then - echo "The permission mode of script ${file} is $(stat -c '%a' ${file}), expected: 75x." +for file in "${MODULE}/"*.sh; do + permissions=$(stat -c '%a' "${file}") + if [[ ${permissions} != 75* ]]; then + echo "The permission mode of script ${file} is ${permissions}, expected: 75x." exit 5 fi done -gsutil -m rsync -R "${MODULE}/" "${GCS_FOLDER}" +gsutil -m rsync -R -x "__pycache__/.*" "${MODULE}/" "${GCS_FOLDER}" echo "Pushed ${MODULE}/ to ${GCS_FOLDER}." -