Merge pull request #16865 from ihmccreery/build-official-release

Auto commit by PR queue bot
pull/6/head
k8s-merge-robot 2015-11-05 22:55:37 -08:00
commit 1e438be0b0
2 changed files with 12 additions and 12 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.
@ -90,8 +90,8 @@ SHA1=$(sha1 "${KUBE_BUILD_DIR}/kubernetes.tar.gz")
cat <<- EOM cat <<- EOM
Success! You must now do the following: (you may want to cut Success! You must now do the following (you may want to cut and paste these
and paste these instructions elsewhere, step 1 can be spammy) instructions elsewhere):
1) (cd ${KUBE_BUILD_DIR}; build/push-official-release.sh ${KUBE_RELEASE_VERSION}) 1) (cd ${KUBE_BUILD_DIR}; build/push-official-release.sh ${KUBE_RELEASE_VERSION})
2) Go to https://github.com/GoogleCloudPlatform/kubernetes/releases 2) Go to https://github.com/GoogleCloudPlatform/kubernetes/releases

View File

@ -24,7 +24,7 @@ set -o pipefail
# Sets DIR, INSTRUCTIONS # Sets DIR, INSTRUCTIONS
function main() { function main() {
# Parse arguments # Parse arguments
if [[ "$#" -ne 2 ]]; then if [[ "$#" -ne 2 && "$#" -ne 3 ]]; then
usage usage
exit 1 exit 1
fi fi
@ -93,11 +93,11 @@ function main() {
local -r release_umask=${release_umask:-022} local -r release_umask=${release_umask:-022}
umask "${release_umask}" umask "${release_umask}"
local -r github="https://github.com/kubernetes/kubernetes.git" local -r github="git@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
@ -111,7 +111,8 @@ You would now do the following, if not a dry run:
EOM EOM
else else
cat > "${INSTRUCTIONS}" <<- EOM cat > "${INSTRUCTIONS}" <<- EOM
Success! You must now do the following: Success! You must now do the following (you may want to cut and paste these
instructions elsewhere):
EOM EOM
fi fi
@ -340,10 +341,9 @@ function rev-version-and-commit() {
function git-push() { function git-push() {
local -r object="${1}" local -r object="${1}"
if $DRY_RUN; then if $DRY_RUN; then
echo "Dry run: would have done git push ${object}" echo "Dry run: would have done git push origin ${object}"
else else
echo "NOT A DRY RUN: you don't really want to git push ${object}, do you?" git push origin "${object}"
# git push "${object}"
fi fi
} }