Skip to content

Commit

Permalink
release scripts respect TMPDIR
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Hollander McCreery committed Apr 28, 2016
1 parent a9c0046 commit 2ba635b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion release/build-official-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function sha1() {

declare -r KUBE_GITHUB="https://github.com/kubernetes/kubernetes.git"
declare -r KUBE_RELEASE_VERSION=${1-}
declare -r TMPDIR=${TMPDIR:-"/tmp"}
declare -r KUBE_RELEASE_UMASK=${KUBE_RELEASE_UMASK:-022}

VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(beta|alpha)\\.(0|[1-9][0-9]*))?$"
Expand All @@ -65,7 +66,7 @@ else
KUBE_RELEASE_TYPE="stable"
fi

declare -r KUBE_BUILD_DIR=$(mktemp -d "/tmp/kubernetes-build-release-${KUBE_RELEASE_VERSION}-XXXXXXX")
declare -r KUBE_BUILD_DIR=$(mktemp -d "${TMPDIR}/kubernetes-build-release-${KUBE_RELEASE_VERSION}-XXXXXXX")

# Set the default umask for the release. This ensures consistency
# across our release builds.
Expand Down
5 changes: 3 additions & 2 deletions release/cut-official-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ function main() {
local -r release_umask=${release_umask:-022}
umask "${release_umask}"

declare -r TMPDIR=${TMPDIR:-"/tmp"}
local -r github="https://github.com/kubernetes/kubernetes.git"
declare -r DIR=$(mktemp -d "/tmp/kubernetes-${release_type}-release-${new_version}-XXXXXXX")
declare -r DIR=$(mktemp -d "${TMPDIR}/kubernetes-${release_type}-release-${new_version}-XXXXXXX")

# Start a tmp file that will hold instructions for the user.
declare -r INSTRUCTIONS=$(mktemp "/tmp/kubernetes-${release_type}-release-${new_version}-instructions-XXXXXXX")
declare -r INSTRUCTIONS=$(mktemp "${TMPDIR}/kubernetes-${release_type}-release-${new_version}-instructions-XXXXXXX")
if $DRY_RUN; then
cat > "${INSTRUCTIONS}" <<- EOM
Success on dry run! Do
Expand Down

0 comments on commit 2ba635b

Please sign in to comment.