summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/pkgctl-build.1.asciidoc4
-rw-r--r--src/lib/build/build.sh10
2 files changed, 13 insertions, 1 deletions
diff --git a/doc/man/pkgctl-build.1.asciidoc b/doc/man/pkgctl-build.1.asciidoc
index 6ae3872..489926e 100644
--- a/doc/man/pkgctl-build.1.asciidoc
+++ b/doc/man/pkgctl-build.1.asciidoc
@@ -60,7 +60,9 @@ Release Options
---------------
*-r, --release*::
- Automatically commit, tag and release after building
+ Automatically commit, tag and release after building +
+ Specifying this option is required when using any of the following options
+ in this section
*-m, --message* 'MSG'::
Use the given <msg> as the commit message
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