Skip to content

Commit

Permalink
Ignore temp files (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
medb authored Jun 13, 2019
1 parent 3014a7b commit c319fb3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore IntelliJ project files
.idea/
*.iml

# Ignore Python cache files after running tests
*/__pycache__/
16 changes: 8 additions & 8 deletions push-to-gcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
set -euo pipefail

[[ $# -eq 2 ]] || {
echo "Usage: ./push-to-gcs.sh <git-ref> <module>"
echo "Example: ./push-to-gcs.sh cbde05 kafka"
exit 1
echo "Usage: ./push-to-gcs.sh <git-ref> <module>"
echo "Example: ./push-to-gcs.sh cbde05 kafka"
exit 1
}

set -x
Expand Down Expand Up @@ -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}."

0 comments on commit c319fb3

Please sign in to comment.