Skip to content

Commit

Permalink
also wrap BK_CACHE_COMPRESS
Browse files Browse the repository at this point in the history
  • Loading branch information
gencer committed Nov 23, 2020
1 parent ee5c84d commit c256c3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/backends/s3.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

# Defaults...
AWS_ARGS=""
COMPRESS=${BUILDKITE_PLUGIN_CACHE_S3_COMPRESS:-false}
BK_CACHE_COMPRESS=${BUILDKITE_PLUGIN_CACHE_S3_COMPRESS:-false}
TAR_ARGS="--ignore-failed-read -cf"
TAR_EXTENSION="tar"
TAR_EXTRACT_ARGS="-xf"

if [[ ! "${COMPRESS:-false}" =~ (false) ]]; then
if [[ ! "${BK_CACHE_COMPRESS:-false}" =~ (false) ]]; then
TAR_ARGS="--ignore-failed-read -zcf"
TAR_EXTENSION="tar.gz"
TAR_EXTRACT_ARGS="-xzf"
fi

if [[ "$OSTYPE" == "darwin"* ]]; then
if [[ ! "${COMPRESS:-false}" =~ (false) ]]; then
if [[ ! "${BK_CACHE_COMPRESS:-false}" =~ (false) ]]; then
TAR_ARGS="-zcf"
else
TAR_ARGS="-cf"
Expand Down
6 changes: 3 additions & 3 deletions lib/backends/tarball.bash
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash

# Defaults...
COMPRESS=${BUILDKITE_PLUGIN_CACHE_TARBALL_COMPRESS:-false}
BK_CACHE_COMPRESS=${BUILDKITE_PLUGIN_CACHE_TARBALL_COMPRESS:-false}
TAR_ARGS="--ignore-failed-read -cf"
TAR_EXTENSION="tar"
TAR_EXTRACT_ARGS="-xf"

if [[ ! "${COMPRESS:-false}" =~ (false) ]]; then
if [[ ! "${BK_CACHE_COMPRESS:-false}" =~ (false) ]]; then
TAR_ARGS="--ignore-failed-read -zcf"
TAR_EXTENSION="tar.gz"
TAR_EXTRACT_ARGS="-xzf"
fi

if [[ "$OSTYPE" == "darwin"* ]]; then
if [[ ! "${COMPRESS:-false}" =~ (false) ]]; then
if [[ ! "${BK_CACHE_COMPRESS:-false}" =~ (false) ]]; then
TAR_ARGS="-zcf"
else
TAR_ARGS="-cf"
Expand Down

0 comments on commit c256c3e

Please sign in to comment.