diff --git a/CHANGELOG.md b/CHANGELOG.md index fe50efd43..d7d2ac94f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). - The /api/t1216-pba/download endpoint. #1864 - Island log download button from "Telemetries"(previously called "Logs") page. #1640 - "/api/client-monkey" endpoint. #1889 +- "+dev" from version numbers. #1553 ### Fixed - A bug in network map page that caused delay of telemetry log loading. #1545 diff --git a/build_scripts/build_package.sh b/build_scripts/build_package.sh index 88f24b4fc..8b2b0b961 100755 --- a/build_scripts/build_package.sh +++ b/build_scripts/build_package.sh @@ -196,14 +196,19 @@ fi install_build_prereqs install_package_specific_build_prereqs "$WORKSPACE" +commit_id=$(get_commit_id "$monkey_repo") + is_release_build=false # Monkey version is empty on release build if [ ! -z "$monkey_version" ]; then is_release_build=true + echo -n "" > "$monkey_repo/monkey/common/BUILD" +else + echo $commit_id > "$monkey_repo/monkey/common/BUILD" fi setup_build_dir "$agent_binary_dir" "$monkey_repo" "$deployment_type" "$is_release_build" -commit_id=$(get_commit_id "$monkey_repo") + build_package "$monkey_version" "$commit_id" "$DIST_DIR" log_message "Finished building package: $package" diff --git a/monkey/common/version.py b/monkey/common/version.py index b3f4a6c2b..67060ae2f 100644 --- a/monkey/common/version.py +++ b/monkey/common/version.py @@ -13,7 +13,10 @@ with open(build_file_path, "r") as build_file: def get_version(build=BUILD): - return f"{MAJOR}.{MINOR}.{PATCH}+{build}" + if build: + return f"{MAJOR}.{MINOR}.{PATCH}+{build}" + else: + return f"{MAJOR}.{MINOR}.{PATCH}" def print_version():