Skip to content

Commit

Permalink
Fix cache root directory (#87)
Browse files Browse the repository at this point in the history
* Use `gradlew` path as project's root path

* Add basic check to tests
  • Loading branch information
Mate Herber authored Jun 24, 2021
1 parent 6fdb353 commit 2fc1fca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ workflows:
echo "[output] BITRISE_MAPPING_PATH: ${BITRISE_MAPPING_PATH}"
echo "[output] BITRISE_CACHE_INCLUDE_PATHS: ${BITRISE_CACHE_INCLUDE_PATHS}"
echo "[output] BITRISE_CACHE_EXCLUDE_PATHS: ${BITRISE_CACHE_EXCLUDE_PATHS}"
if [ -z "${BITRISE_CACHE_INCLUDE_PATHS}" ]; then
echo "Include paths are not set"
exit 1
fi
if [ -z "${BITRISE_CACHE_EXCLUDE_PATHS}" ]; then
echo "Exclude paths are not set"
exit 1
fi
set -x
ls -alh "$BITRISE_DEPLOY_DIR"
Expand Down
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ func main() {

// Collecting caches
log.Infof("Collecting cache:")
const defaultProjectRoot = "."
if warning := cache.Collect(defaultProjectRoot, utilscache.Level(configs.CacheLevel)); warning != nil {
if warning := cache.Collect(filepath.Dir(gradlewPath), utilscache.Level(configs.CacheLevel)); warning != nil {
log.Warnf("%s", warning)
}

Expand Down

0 comments on commit 2fc1fca

Please sign in to comment.