Skip to content

Commit

Permalink
v2.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
gencer committed Jan 6, 2021
1 parent ca3c5da commit 851f366
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v2.3.7

+ Do not check `busybox` on macOS. See #17.

# v2.3.6

+ Added checking for `busybox` and fallback to lesser options of `tar`.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cache Buildkite Plugin [![Version badge](https://img.shields.io/badge/cache-v2.3.6-blue?style=flat-square)](https://buildkite.com/plugins) [![Build status](https://badge.buildkite.com/eb76936a02fe8d522fe8cc986c034a6a8d83c7ec75e607f7bb.svg)](https://buildkite.com/gencer/buildkite-cache)
# Cache Buildkite Plugin [![Version badge](https://img.shields.io/badge/cache-v2.3.7-blue?style=flat-square)](https://buildkite.com/plugins) [![Build status](https://badge.buildkite.com/eb76936a02fe8d522fe8cc986c034a6a8d83c7ec75e607f7bb.svg)](https://buildkite.com/gencer/buildkite-cache)


### Tarball, Rsync & S3 Cache Kit for Buildkite. Supports Linux, macOS and Windows*
Expand Down Expand Up @@ -42,7 +42,7 @@ variables defined in your agent. Content of the paths will be packed with `tar`
```yml
steps:
- plugins:
- gencer/cache#v2.3.6:
- gencer/cache#v2.3.7:
backend: s3
key: "v1-cache-{{ runner.os }}-{{ checksum 'Podfile.lock' }}"
s3:
Expand Down Expand Up @@ -85,7 +85,7 @@ You can also use rsync to store your files using the `rsync` backend. Files will
```yml
steps:
- plugins:
- gencer/cache#v2.3.6:
- gencer/cache#v2.3.7:
backend: rsync
key: "v1-cache-{{ runner.os }}-{{ checksum 'Podfile.lock' }}"
rsync:
Expand All @@ -108,7 +108,7 @@ You can also use tarballs to store your files using the `tarball` backend. Files
```yml
steps:
- plugins:
- gencer/cache#v2.3.6:
- gencer/cache#v2.3.7:
backend: tarball
key: "v1-cache-{{ runner.os }}-{{ checksum 'Podfile.lock' }}"
tarball:
Expand Down Expand Up @@ -138,7 +138,7 @@ Along with lock files, you can calculate directory that contains multiple files
```yml
steps:
- plugins:
- gencer/cache#v2.3.6:
- gencer/cache#v2.3.7:
backend: tarball
key: "v1-cache-{{ runner.os }}-{{ checksum './app/javascript' }}" # Calculate whole 'app/javascript' recursively
tarball:
Expand All @@ -161,7 +161,7 @@ You can skip caching on Pull Requests (Merge Requests) by simply adding `pr: fal
```yml
steps:
- plugins:
- gencer/cache#v2.3.6:
- gencer/cache#v2.3.7:
backend: s3
key: "v1-cache-{{ runner.os }}-{{ checksum 'Podfile.lock' }}"
pr: false # Default to `true` which is do cache on PRs.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.6
2.3.7
38 changes: 17 additions & 21 deletions lib/backends/s3.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,25 @@ BK_TAR_ADDITIONAL_ARGS="--ignore-failed-read"
BK_TAR_EXTENSION="tar"
BK_TAR_EXTRACT_ARGS="-xf"

shell_exec=$(
exec 2>/dev/null
readlink "/proc/$$/exe"
)
case "$shell_exec" in
*/busybox)
BK_TAR_ADDITIONAL_ARGS=""
;;
# TODO: Add macOS
# *)
# BK_TAR_ARGS="--ignore-failed-read -cf"
# ;;
esac
if [[ ! "$OSTYPE" == "darwin"* ]]; then
shell_exec=$(
exec 2>/dev/null
readlink "/proc/$$/exe"
)
case "$shell_exec" in
*/busybox)
BK_TAR_ADDITIONAL_ARGS=""
;;
esac

if [[ ! "${BK_CACHE_COMPRESS:-false}" =~ (false) ]]; then
BK_TAR_ARGS="${BK_TAR_ADDITIONAL_ARGS} -zcf"
BK_TAR_EXTENSION="tar.gz"
BK_TAR_EXTRACT_ARGS="-xzf"
if [[ ! "${BK_CACHE_COMPRESS:-false}" =~ (false) ]]; then
BK_TAR_ARGS="${BK_TAR_ADDITIONAL_ARGS} -zcf"
BK_TAR_EXTENSION="tar.gz"
BK_TAR_EXTRACT_ARGS="-xzf"
else
BK_TAR_ARGS="${BK_TAR_ADDITIONAL_ARGS} -cf"
fi
else
BK_TAR_ARGS="${BK_TAR_ADDITIONAL_ARGS} -cf"
fi

if [[ "$OSTYPE" == "darwin"* ]]; then
if [[ ! "${BK_CACHE_COMPRESS:-false}" =~ (false) ]]; then
BK_TAR_ARGS="-zcf"
else
Expand Down
2 changes: 1 addition & 1 deletion lib/backends/tarball.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [[ ! "$OSTYPE" == "darwin"* ]]; then
BK_TAR_ADDITIONAL_ARGS=""
;;
esac

if [[ ! "${BK_CACHE_COMPRESS:-false}" =~ (false) ]]; then
BK_TAR_ARGS="${BK_TAR_ADDITIONAL_ARGS} -zcf"
BK_TAR_EXTENSION="tar.gz"
Expand Down

0 comments on commit 851f366

Please sign in to comment.