WIP release process fixes

This commit is contained in:
Isaac Hollander McCreery 2015-11-05 11:15:58 -08:00
parent c9c78a3e54
commit 652a8a6a44
2 changed files with 4 additions and 4 deletions

View File

@ -45,13 +45,13 @@ declare -r KUBE_GITHUB="https://github.com/kubernetes/kubernetes.git"
declare -r KUBE_RELEASE_VERSION=${1-} declare -r KUBE_RELEASE_VERSION=${1-}
declare -r KUBE_RELEASE_UMASK=${KUBE_RELEASE_UMASK:-022} 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]*))?$" 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]*))?$"
[[ ${KUBE_RELEASE_VERSION} =~ ${VERSION_REGEX} ]] || { [[ ${KUBE_RELEASE_VERSION} =~ ${VERSION_REGEX} ]] || {
echo "!!! You must specify the version you are releasing in the form of '${VERSION_REGEX}'" >&2 echo "!!! You must specify the version you are releasing in the form of '${VERSION_REGEX}'" >&2
exit 1 exit 1
} }
declare -r KUBE_BUILD_DIR="/tmp/kubernetes-release-${KUBE_RELEASE_VERSION}-$(date +%s)" declare -r KUBE_BUILD_DIR=$(mktemp -d "/tmp/kubernetes-build-release-${KUBE_RELEASE_VERSION}-XXXXXXX")
# Set the default umask for the release. This ensures consistency # Set the default umask for the release. This ensures consistency
# across our release builds. # across our release builds.

View File

@ -94,10 +94,10 @@ function main() {
umask "${release_umask}" umask "${release_umask}"
local -r github="https://github.com/kubernetes/kubernetes.git" local -r github="https://github.com/kubernetes/kubernetes.git"
declare -r DIR="/tmp/kubernetes-${release_type}-release-${new_version}-$(date +%s)" declare -r DIR=$(mktemp -d "/tmp/kubernetes-${release_type}-release-${new_version}-XXXXXXX")
# Start a tmp file that will hold instructions for the user. # Start a tmp file that will hold instructions for the user.
declare -r INSTRUCTIONS="/tmp/kubernetes-${release_type}-release-${new_version}-$(date +%s)-instructions" declare -r INSTRUCTIONS=$(mktemp "/tmp/kubernetes-${release_type}-release-${new_version}-instructions-XXXXXXX")
if $DRY_RUN; then if $DRY_RUN; then
cat > "${INSTRUCTIONS}" <<- EOM cat > "${INSTRUCTIONS}" <<- EOM
Success on dry run! Do Success on dry run! Do