|
14 | 14 | # See the License for the specific language governing permissions and
|
15 | 15 | # limitations under the License.
|
16 | 16 |
|
17 |
| -set -xe |
| 17 | +set -e |
18 | 18 |
|
19 | 19 | TAG_NAME=$1
|
20 | 20 | BRANCH=$2
|
21 | 21 | REPO=kubeflow/pipelines
|
22 | 22 |
|
23 | 23 | if [[ -z "$BRANCH" || -z "$TAG_NAME" ]]; then
|
24 |
| - echo "Usage: release.sh <release-tag> <release-branch>" >&2 |
| 24 | + echo "Usage: ./hack/release.sh <release-tag> <release-branch>" >&2 |
25 | 25 | exit 1
|
26 | 26 | fi
|
27 | 27 |
|
|
31 | 31 | cd "$clone_dir"
|
32 | 32 | git checkout "$BRANCH"
|
33 | 33 |
|
| 34 | +echo "Preparing local git tags used by changelog generation." |
| 35 | +# tags with "-" are pre-releases, e.g. 1.0.0-rc.1 |
| 36 | +if [[ "$TAG_NAME" =~ "-" ]]; then |
| 37 | + echo "Releasing a pre-release $TAG_NAME." |
| 38 | +else |
| 39 | + echo "Releasing a stable release $TAG_NAME." |
| 40 | + echo "Deleting all local pre-release tags to generate changelog from the last stable release. See issue https://github.com/kubeflow/pipelines/issues/4248.". |
| 41 | + for tag in $(git tag | grep -) |
| 42 | + do |
| 43 | + git tag -d "$tag" |
| 44 | + done |
| 45 | +fi |
| 46 | + |
| 47 | +echo "Running the ./hack/release-imp.sh script in cloned repo" |
34 | 48 | echo -n "$TAG_NAME" > ./VERSION
|
35 |
| -# Run the release script in cloned repo |
36 |
| -"hack/release-imp.sh" $TAG_NAME |
| 49 | +"hack/release-imp.sh" |
37 | 50 |
|
38 |
| -# Checking-in the component changes |
| 51 | +echo "Checking in the version bump changes" |
39 | 52 | git add --all
|
40 | 53 | git commit --message "chore(release): bumped version to $TAG_NAME"
|
41 | 54 | git tag -a "$TAG_NAME" -m "Kubeflow Pipelines $TAG_NAME release"
|
42 | 55 |
|
43 |
| -# Pushing the changes upstream |
| 56 | +echo "Pushing the changes upstream" |
44 | 57 | read -p "Do you want to push the version change and tag $TAG_NAME tag to upstream? [y|n]"
|
45 | 58 | if [ "$REPLY" != "y" ]; then
|
46 | 59 | exit
|
|
0 commit comments