mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #16865 from ihmccreery/build-official-release
Auto commit by PR queue bot
This commit is contained in:
		@@ -45,13 +45,13 @@ declare -r KUBE_GITHUB="https://github.com/kubernetes/kubernetes.git"
 | 
			
		||||
declare -r KUBE_RELEASE_VERSION=${1-}
 | 
			
		||||
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} ]] || {
 | 
			
		||||
  echo "!!! You must specify the version you are releasing in the form of '${VERSION_REGEX}'" >&2
 | 
			
		||||
  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
 | 
			
		||||
# across our release builds.
 | 
			
		||||
@@ -90,8 +90,8 @@ SHA1=$(sha1 "${KUBE_BUILD_DIR}/kubernetes.tar.gz")
 | 
			
		||||
 | 
			
		||||
cat <<- EOM
 | 
			
		||||
 | 
			
		||||
Success! You must now do the following: (you may want to cut
 | 
			
		||||
  and paste these instructions elsewhere, step 1 can be spammy)
 | 
			
		||||
Success!  You must now do the following (you may want to cut and paste these
 | 
			
		||||
instructions elsewhere):
 | 
			
		||||
 | 
			
		||||
  1) (cd ${KUBE_BUILD_DIR}; build/push-official-release.sh ${KUBE_RELEASE_VERSION})
 | 
			
		||||
  2) Go to https://github.com/GoogleCloudPlatform/kubernetes/releases
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@ set -o pipefail
 | 
			
		||||
# Sets DIR, INSTRUCTIONS
 | 
			
		||||
function main() {
 | 
			
		||||
  # Parse arguments
 | 
			
		||||
  if [[ "$#" -ne 2 ]]; then
 | 
			
		||||
  if [[ "$#" -ne 2 && "$#" -ne 3 ]]; then
 | 
			
		||||
    usage
 | 
			
		||||
    exit 1
 | 
			
		||||
  fi
 | 
			
		||||
@@ -93,11 +93,11 @@ function main() {
 | 
			
		||||
  local -r release_umask=${release_umask:-022}
 | 
			
		||||
  umask "${release_umask}"
 | 
			
		||||
 | 
			
		||||
  local -r github="https://github.com/kubernetes/kubernetes.git"
 | 
			
		||||
  declare -r DIR="/tmp/kubernetes-${release_type}-release-${new_version}-$(date +%s)"
 | 
			
		||||
  local -r github="git@github.com:kubernetes/kubernetes.git"
 | 
			
		||||
  declare -r DIR=$(mktemp -d "/tmp/kubernetes-${release_type}-release-${new_version}-XXXXXXX")
 | 
			
		||||
 | 
			
		||||
  # 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
 | 
			
		||||
    cat > "${INSTRUCTIONS}" <<- EOM
 | 
			
		||||
Success on dry run!  Do
 | 
			
		||||
@@ -111,7 +111,8 @@ You would now do the following, if not a dry run:
 | 
			
		||||
EOM
 | 
			
		||||
  else
 | 
			
		||||
    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
 | 
			
		||||
  fi
 | 
			
		||||
@@ -340,10 +341,9 @@ function rev-version-and-commit() {
 | 
			
		||||
function git-push() {
 | 
			
		||||
  local -r object="${1}"
 | 
			
		||||
  if $DRY_RUN; then
 | 
			
		||||
    echo "Dry run: would have done git push ${object}"
 | 
			
		||||
    echo "Dry run: would have done git push origin ${object}"
 | 
			
		||||
  else
 | 
			
		||||
    echo "NOT A DRY RUN: you don't really want to git push ${object}, do you?"
 | 
			
		||||
    # git push "${object}"
 | 
			
		||||
    git push origin "${object}"
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user