|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -git reset --hard |
4 | | -git pull |
| 3 | +#git reset --hard |
| 4 | +#git pull |
| 5 | + |
| 6 | +echo "Enter version of Kaoto to release:" |
| 7 | +echo "Example: 1.0.0" |
| 8 | +read -r version |
| 9 | + |
| 10 | +git checkout -b release-$version |
| 11 | + |
| 12 | +echo "Do you want to push the generated branches to your fork? (y/n)" |
| 13 | +echo "Note: This will make it easier to create the pull requests later." |
| 14 | +read -r gitPush |
| 15 | + |
| 16 | +if [ "$gitPush" = "y" ]; |
| 17 | +then |
| 18 | + echo "Enter the name of the fork (git remote -v can help you here)" |
| 19 | + echo "Example: upstream" |
| 20 | + read -r gitFork |
| 21 | +fi |
5 | 22 |
|
6 | 23 | echo "Do you want to download the latest zips of steps? (y/n)" |
7 | 24 | echo "Note: This includes Apache Camel components, kamelets, and kaoto bridged camel components." |
|
66 | 83 | git commit -m "chore(resources): Updating zip files with step catalog components." |
67 | 84 | fi |
68 | 85 |
|
69 | | -echo "Enter version of Kaoto to release:" |
70 | | -echo "Example: 1.0.0" |
71 | | -read -r version |
72 | | - |
73 | 86 | mvn versions:set -DnewVersion=$version |
74 | 87 | git add . |
75 | 88 | git commit -m "Updating to version $version" |
76 | | -git tag v$version |
77 | 89 |
|
78 | | -echo "Now we are going to test the new version." |
79 | | - |
80 | | -mvn install |
| 90 | +if [ "$gitPush" = "y" ]; |
| 91 | +then |
| 92 | + git push $gitFork |
| 93 | +fi |
81 | 94 |
|
82 | 95 | echo "Enter new development version:" |
83 | 96 | echo "(SNAPSHOT will be added automatically)" |
84 | 97 | echo "Example: 1.0.1" |
85 | 98 | read -r version2 |
86 | 99 |
|
| 100 | +git checkout -b release-$version2 |
87 | 101 | mvn versions:set -DnewVersion="$version2"-SNAPSHOT |
88 | 102 | git add . |
89 | 103 | git commit -m "chore(release): Updating to version $version2-SNAPSHOT" |
90 | 104 |
|
| 105 | +if [ "$gitPush" = "y" ]; |
| 106 | +then |
| 107 | + git push $gitFork |
| 108 | +fi |
| 109 | + |
| 110 | +echo "" |
| 111 | +echo "Check the git log and if you like what you see, create pull requests" |
| 112 | +echo "for both branches release-$version and release-$version2." |
91 | 113 | echo "" |
92 | | -echo "Check the git log and if you like what you see, just do" |
93 | | -echo "'git push' and 'git push --tags'." |
94 | | -echo "This will trigger the release creation." |
| 114 | +echo "Once the pull requests are merged, you can tag the version where release-$version is." |
| 115 | +echo "Creating the tag will trigger the release creation." |
95 | 116 | echo "" |
96 | | -echo "Then go to https://github.com/KaotoIO/kaoto-backend/releases/ to review" |
| 117 | +echo "Finally, go to https://github.com/KaotoIO/kaoto-backend/releases/ to review" |
97 | 118 | echo "the text of the release and publish it. " |
98 | 119 | echo "" |
99 | 120 | echo "Congratulations! Your job here is done." |
0 commit comments