summaryrefslogtreecommitdiff
path: root/src/lib/build/build.sh
diff options
context:
space:
mode:
authorChristian Heusel <christian@heusel.eu>2023-04-18 01:15:24 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-05-20 00:08:13 +0200
commit4289be212b38cbd9a1676303224b6af5c00bd429 (patch)
treec8df17068dc3bbf533ca06ac6f5b880b2b51b99e /src/lib/build/build.sh
parented966351410b39bfcec749df59dbc434a5dade1e (diff)
downloaddevtools-4289be212b38cbd9a1676303224b6af5c00bd429.tar.xz
build: allow release options only in combination with --release
It leads to weird expectations when using --db-update or --message without --release. Make the behavior more user friendly, by aborting the operation and explaining that release options only work in conjunction with the release option. Fixes #131 Signed-off-by: Christian Heusel <christian@heusel.eu>
Diffstat (limited to 'src/lib/build/build.sh')
-rw-r--r--src/lib/build/build.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh
index fff8125..2153200 100644
--- a/src/lib/build/build.sh
+++ b/src/lib/build/build.sh
@@ -238,6 +238,16 @@ pkgctl_build() {
esac
done
+ # check if any release specific options were specified without releasing
+ if (( ! RELEASE )); then
+ if (( DB_UPDATE )); then
+ die "cannot use --db-update without --release"
+ fi
+ if [[ -n "${MESSAGE}" ]]; then
+ die "cannot use --message without --release"
+ fi
+ fi
+
# check if invoked without any path from within a packaging repo
if (( ${#paths[@]} == 0 )); then
if [[ -f PKGBUILD ]]; then