diff --git a/make_deb b/make_deb index bbfa295e4..94d42ad11 100755 --- a/make_deb +++ b/make_deb @@ -86,9 +86,9 @@ BUILD_ROOT="${GIT_ROOT}/packages/build" # Get git info git_tag_info=$(git describe --tags) && commit_count=$(echo ${git_tag_info} | cut -d- -f2) - +branch_name=$(git rev-parse --abbrev-ref HEAD) # Final package name -package_name="fledge-gui-${version}-${commit_count}" +if [[ ${branch_name} != "main" ]] && [[ ! ${branch_name} =~ ^[0-9]+\.[0-9]+\.[0-9]+RC ]]; then package_name="fledge-gui-${version}-${commit_count}"; version=${git_tag_info:1}; else package_name="fledge-gui-${version}"; fi # Print the summary of findings echo "The package root directory is : ${GIT_ROOT}" @@ -123,7 +123,7 @@ mkdir "${package_name}" echo -n "Populating the package and updating version file..." cd "${package_name}" cp -R ${GIT_ROOT}/packages/Debian/* . -sed -i "s/Version: 0.0.0/Version: ${git_tag_info:1}/g" DEBIAN/control +sed -i "s/Version: 0.0.0/Version: ${version}/g" DEBIAN/control echo "Done."