Skip to content

Commit

Permalink
Fix typos and update readme (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinbui authored Sep 25, 2024
1 parent 64143c0 commit eee89ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ steps:
class: STANDARD # Optional. Defaults to empty which is usually STANDARD or based on policy.
args: '--option 1' # Optional. Defaults to empty. Any optional argument that can be passed to aws s3 cp command.
save-cache: true # Optional. Saves the cache on temp folder and keep between builds/jobs on the same machine.
save-cache-dir: /mnt/cache # Optional. Where to save the cache if `save-cache` is enabled.
paths:
- 'bundle/vendor'
```
Expand Down Expand Up @@ -517,6 +518,7 @@ steps:
s3:
bucket: s3-bucket
save-cache: true # Optional. Saves the cache on temp folder and keep between builds/jobs on the same machine. Defaults to `false`
save-cache-dir: /mnt/cache # Optional. Where to save the cache if `save-cache` is enabled.
paths:
- bundle/vendor
```
Expand Down
6 changes: 3 additions & 3 deletions lib/backends/s3.bash
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ function restore() {

# Check if prefere local is true and if tar file exists in tmp dir
if [ "${BK_CACHE_SAVE_CACHE}" == "true" ] && [ -f "${BK_CACHE_LOCAL_PATH}/${TAR_FILE}" ]; then
echo -e "${BK_LOG_PREFIX}:file_cabinet: Using previously downloaded file ${BK_CACHE_LOCAL_PATH}/${TAR_FILE} since local is prefered."
echo -e "${BK_LOG_PREFIX}🗄️ Using previously downloaded file ${BK_CACHE_LOCAL_PATH}/${TAR_FILE} since local is preferred."
if tar ${BK_TAR_EXTRACT_ARGS} "${BK_CACHE_LOCAL_PATH}/${TAR_FILE}" -C . ; then
return
fi
echo -e "${BK_LOG_PREFIX}:file_cabinet: Ignoring corrupted previously downloaded file ${BK_CACHE_LOCAL_PATH}/${TAR_FILE}."
echo -e "${BK_LOG_PREFIX}🗄️ Ignoring corrupted previously downloaded file ${BK_CACHE_LOCAL_PATH}/${TAR_FILE}."
fi

aws s3api head-object --bucket "${BUILDKITE_PLUGIN_CACHE_S3_BUCKET}" --key "${TKEY}/${TAR_FILE}" ${BK_DEFAULT_AWS_ARGS} || no_head=true
Expand Down Expand Up @@ -149,7 +149,7 @@ function cache() {
cache_locating "${TAR_TARGETS}"

if [ $BK_ALWAYS_CACHE == "true" ]; then
echo -e "${BK_LOG_PREFIX}:file_cabinet::close: Removing previously found cache ${TAR_FILE} since always is true."
echo -e "${BK_LOG_PREFIX}🗄️🗑️ Removing previously found cache ${TAR_FILE} since always is true."
rm -f "${TAR_FILE}"
fi

Expand Down
2 changes: 1 addition & 1 deletion lib/backends/tarball.bash
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function cache() {
TAR_FILE="${CACHE_PREFIX}/${CACHE_KEY}.${BK_TAR_EXTENSION}"

if [ $BK_ALWAYS_CACHE == "true" ]; then
echo -e "${BK_LOG_PREFIX}:file_cabinet::close: Removing previously found cache ${TAR_FILE} since always is true."
echo -e "${BK_LOG_PREFIX}🗄️🗑️ Removing previously found cache ${TAR_FILE} since always is true."
rm -f "${TAR_FILE}"
fi

Expand Down

0 comments on commit eee89ea

Please sign in to comment.