release.sh: show build notice in all appropriate cases
Ximin Luo
4 years ago
145 | 145 | new_bin_packages="$(echo "$diff_bin_packages" | grep '^+' | sed -e 's/^+//g')" |
146 | 146 | rm_bin_packages="$(echo "$diff_bin_packages" | grep '^-' | sed -e 's/^-//g')" |
147 | 147 | |
148 | show_build_notice() { | |
149 | cat <<eof | |
150 | The recommended way to build and upload is to run something like: | |
151 | ||
152 | cd build && ./build.sh $CRATE $VER && dput ${DEBSRC}_${DEBVER}_${DEB_HOST_ARCH}.changes | |
153 | eof | |
154 | } | |
155 | ||
148 | 156 | cat <<eof |
149 | 157 | Release of $CRATE ready as a source package in ${BUILDDIR#$PWD/}. You need to |
150 | 158 | perform the following steps: |
162 | 170 | $upload_bin_packages |
163 | 171 | ${NC} |
164 | 172 | eof |
165 | ||
166 | else | |
167 | ||
168 | if [ -z "$new_bin_packages" ]; then | |
169 | ||
173 | show_build_notice | |
174 | ||
175 | elif [ -z "$new_bin_packages" ]; then | |
170 | 176 | cat <<eof |
171 | 177 | Since the source package is already in Debian and this version does not introduce |
172 | 178 | new binaries, then you can just go ahead and directly dput the source package. |
176 | 182 | For your reference, this source package builds $(echo "$upload_bin_packages" | wc -l) binary package(s): |
177 | 183 | $upload_bin_packages |
178 | 184 | eof |
179 | ||
185 | # don't show build notice | |
180 | 186 | |
181 | 187 | else |
182 | ||
183 | 188 | cat <<eof |
184 | 189 | ${RED} |
185 | 190 | ATTENTION: this upload introduces NEW binary packages not already in the Debian |
195 | 200 | $new_bin_packages |
196 | 201 | ${NC} |
197 | 202 | eof |
198 | ||
199 | fi | |
200 | ||
201 | cat <<eof | |
202 | ||
203 | The recommended way to build and upload is to run something like: | |
204 | ||
205 | cd build && ./build.sh $CRATE $VER && dput ${DEBSRC}_${DEBVER}_${DEB_HOST_ARCH}.changes | |
206 | eof | |
207 | ||
208 | fi | |
203 | show_build_notice | |
204 | ||
205 | fi # end decision-making on show_build_notice | |
209 | 206 | |
210 | 207 | if [ -n "$rm_bin_packages" ]; then |
211 | 208 |