|
1 |
| -# This file is intended to document release steps. |
2 |
| -# Verify each step's result before calling the next command. |
3 |
| -# It is documented here with the intention of being automated |
4 |
| -# as a shell script later. |
| 1 | +#!/bin/bash |
5 | 2 |
|
6 |
| -echo 'git clean -xdf' |
7 |
| -echo 'python setup.py sdist' |
8 |
| -echo 'python setup.py bdist_wheel --universal' |
9 |
| -echo 'twine upload dist/* -r https://upload.pypi.org/legacy/ -u kubernetes' |
| 3 | +# Copyright 2021 The Kubernetes Authors. |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
10 | 16 |
|
| 17 | +# Workflow |
| 18 | +# 1. [master branch] update existing snapshot (include API change for a new alpha/beta/GA |
| 19 | +# release) |
| 20 | +# - add a new snapshot or reuse the existing snapshot, the latter means either |
| 21 | +# API change happened in a k8s patch release, or we want to include some new |
| 22 | +# python / python-base change in the release note |
| 23 | +# - API change w/ release notes |
| 24 | +# - master change w/ release notes |
| 25 | +# - submodule change w/ release notes |
| 26 | +# 2. [master branch] create new snapshot (include API change for a new alpha release) |
| 27 | +# - add a new snapshot or reuse the existing snapshot, the latter means either |
| 28 | +# API change happened in a k8s patch release, or we want to include some new |
| 29 | +# python / python-base change in the release note |
| 30 | +# - API change w/ release notes |
| 31 | +# - master change w/ release notes |
| 32 | +# - submodule change w/ release notes |
| 33 | +# 3. [release branch] create a new release |
| 34 | +# - pull master |
| 35 | +# - it's possible that master has new changes after the latest snaphost, |
| 36 | +# update CHANGELOG accordingly |
| 37 | +# - for generated file, resolve conflict by committing the master version |
| 38 | +# - abort if a snapshot doesn't exists |
| 39 | +# - generate client change, abort if API change is detected |
| 40 | +# - CHANGELOG: latest snapshot becomes the release |
| 41 | +# - README: add the release to README |
| 42 | +# - an extra PR to update CHANGELOG and README in master |
| 43 | +# |
| 44 | +# Difference between 1&2: API change release notes |
| 45 | +# |
| 46 | +# TODO: |
| 47 | +# - additionally, validate the branch |
| 48 | +# - send the PR(s) automatically |
| 49 | +# |
| 50 | +# Usage: |
| 51 | + |
| 52 | +set -o errexit |
| 53 | +set -o nounset |
| 54 | +set -o pipefail |
| 55 | + |
| 56 | +repo_root="$(git rev-parse --show-toplevel)" |
| 57 | +declare -r repo_root |
| 58 | +cd "${repo_root}" |
| 59 | + |
| 60 | +source scripts/util/changelog.sh |
| 61 | + |
| 62 | +# KUBERNETES_BRANCH=${KUBERNETES_BRANCH:-$(python "${SCRIPT_ROOT}/constants.py" KUBERNETES_BRANCH)} |
| 63 | +# CLIENT_VERSION=${CLIENT_VERSION:-$(python "${SCRIPT_ROOT}/constants.py" CLIENT_VERSION)} |
| 64 | +# DEVELOPMENT_STATUS=${DEVELOPMENT_STATUS:-$(python "${SCRIPT_ROOT}/constants.py" DEVELOPMENT_STATUS)} |
| 65 | +KUBERNETES_BRANCH="release-1.18" |
| 66 | +CLIENT_VERSION="18.0.0-snapshot" |
| 67 | +DEVELOPMENT_STATUS="3 - Alpha" |
| 68 | + |
| 69 | +# validate inputs |
| 70 | + |
| 71 | +# get Kubernetes API Version |
| 72 | +old_api_version="1.17.13" |
| 73 | +new_api_version="" |
0 commit comments