From e90492304b82b43c3be60558ab9551c505d0123a Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Fri, 17 Jul 2015 08:53:44 -0600 Subject: Added WORKING_CACHE variable This variable contains the path underneath deploy for the cache pertinent to the current push (eg: deploy_dir/repo_name/branch_name). --- README.md | 2 ++ git-deploy-cache.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index c342c5c..4da3326 100644 --- a/README.md +++ b/README.md @@ -79,3 +79,5 @@ The variables made available by this function are... * **FILES_D**: List of **D**eleted files * **FILES_E**: List of all files **E**xisting in the commit, modified or new. Does not include deleted files. +* **CURRENT_CACHE**: Current working cache directory (eg: + *///*) diff --git a/git-deploy-cache.sh b/git-deploy-cache.sh index 759c3f8..35ddb26 100755 --- a/git-deploy-cache.sh +++ b/git-deploy-cache.sh @@ -125,6 +125,9 @@ function main { # Set up global enviro variables that will be of use later enviro_setup ${oldrev} ${newrev} ${refname} + # The current cache directory being used + export WORKING_CACHE=${deploy_base}/${REPOSITORY}/${BRANCH} + log "Deployment triggered by ${newrev}" # Deploy a working copy of the repo so we have something to work on -- cgit v1.2.3