yjhjstz commented on code in PR #13:
URL: 
https://github.com/apache/cloudberry-devops-release/pull/13#discussion_r2023285509


##########
scripts/build-deb.sh:
##########
@@ -0,0 +1,148 @@
+#!/bin/bash
+#
+# Script Name: build-deb.sh
+#
+# Description:
+# This script automates the process of building an DEB package using a 
specified
+# version number. It ensures that the necessary tools are installed
+# and that the control file exists before attempting to build the DEB. The 
script
+# also includes error handling to provide meaningful feedback in case of 
failure.
+#
+# Usage:
+# ./build-deb.sh [-v <version>] [-h] [--dry-run]
+#
+# Options:
+#   -v, --version <version>    : Specify the version (required)
+#   -h, --help                 : Display this help and exit
+#   -n, --dry-run              : Show what would be done, without making any 
changes
+#
+# Example:
+#   ./build-deb.sh -v 1.5.5               # Build with version 1.5.5
+#
+# Prerequisites:
+# - The dpkg-buildpackage package must be installed (provides the 
dpkg-buildpackage command).
+# - The control file must exist at debian/control.
+#
+# Error Handling:
+# The script includes checks to ensure:
+# - The version option (-v or --version) is provided.
+# - The necessary commands are available.
+# - The control file exists at the specified location.
+# If any of these checks fail, the script exits with an appropriate error 
message.
+
+# Enable strict mode for better error handling
+set -euo pipefail
+
+# Default values
+VERSION=""
+RELEASE="1"
+DEBUG_BUILD=false
+
+# Function to display usage information
+usage() {
+  echo "Usage: $0 [-v <version>] [-h] [--dry-run]"
+  echo "  -v, --version <version>    : Specify the version (optional)"
+  echo "  -h, --help                 : Display this help and exit"

Review Comment:
   Could you please product debuginfo package as well ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to