Skip to content

Commit

Permalink
fix: added eval to find command (#50)
Browse files Browse the repository at this point in the history
* perf: added kts files to cache key

* fix: fixed find parameters

* try: replaced default values for restore cache

* fix: added eval and reworded default value
  • Loading branch information
ryanbourdais authored Jun 28, 2022
1 parent 25d88f5 commit 06a3418
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/commands/restore-gradle-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ parameters:
Use this to customize how the find command is used to look for relevant
file changes.
type: string
default: . -type f \( -name 'build.gradle' -o -name 'settings.gradle' -o -name 'build.gradle.kts' -o -name 'settings.gradle.kts' \)
default: ". -name \"build.gradle*\" -o -name \"settings.gradle*\""
steps:
- run:
environment:
Expand Down
2 changes: 1 addition & 1 deletion src/commands/start-emulator-and-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ parameters:
Use this to customize how the find command is used to look for relevant
file changes.
type: string
default: ". -name 'build.gradle'"
default: ". -name \"build.gradle*\" -o -name \"settings.gradle*\""
save-gradle-cache:
description: |
Whether to write to the gradle cache after the tests have run
Expand Down
2 changes: 1 addition & 1 deletion src/commands/start-emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ parameters:
Use this to customize how the find command is used to look for relevant
file changes.
type: string
default: ". -name 'build.gradle'"
default: ". -name \"build.gradle*\" -o -name \"settings.gradle*\""
post-emulator-wait-steps:
description: |
Steps to execute after waiting for the emulator to start up
Expand Down
2 changes: 1 addition & 1 deletion src/jobs/run-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ parameters:
Use this to customize how the find command is used to look for relevant
file changes.
type: string
default: ". -name 'build.gradle'"
default: ". -name \"build.gradle*\" -o -name \"settings.gradle*\""
save-gradle-cache:
description: |
Whether to write to the gradle cache after the tests have run
Expand Down
6 changes: 4 additions & 2 deletions src/scripts/generate-cache-checksum.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash
find ${PARAM_FIND_ARGS} | sort | xargs cat |
shasum | awk '{print $1}' > /tmp/gradle_cache_seed
echo "The following are the files used to generate the cache checksum:"
eval find "${PARAM_FIND_ARGS}"
eval find "${PARAM_FIND_ARGS}" | sort | xargs cat |
shasum | awk '{print $1}' > /tmp/gradle_cache_seed

0 comments on commit 06a3418

Please sign in to comment.