From 226c72df5f5dc694276553ec2dd1110468078d8c Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 18 Oct 2021 17:33:19 +0300 Subject: [PATCH] Deployments: Rename appImage deployment only if a specific version is not specified With this change, Jenkins will output packages in the following naming conventions: Develop: InfectionMonkey-$commit_number_x86_64.AppImage Release: InfectionMonkey-v$version.AppImage --- build_scripts/appimage/appimage.sh | 17 +++++++++++------ build_scripts/appimage/infection-monkey.desktop | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/build_scripts/appimage/appimage.sh b/build_scripts/appimage/appimage.sh index 39d606e3d..5e2a25245 100755 --- a/build_scripts/appimage/appimage.sh +++ b/build_scripts/appimage/appimage.sh @@ -119,7 +119,12 @@ build_package() { --deploy-deps-only="$MONGO_PATH/bin/mongod"\ --output appimage - dst_name="InfectionMonkey-v$version.AppImage" + # Rename to + if $IS_RELEASE_BUILD; then + dst_name="InfectionMonkey-v$version.AppImage" + else + dst_name="" + fi move_package_to_dist_dir $dist_dir $dst_name popd @@ -127,14 +132,14 @@ build_package() { set_version() { # The linuxdeploy and appimage-builder tools will use the commit hash of the - # repo to name the AppImage, which is preferable to using "dev". If the - # version was specified in a command-line argument (i.e. not "dev"), then + # repo to name the AppImage. If the + # version was specified in a command-line argument, then # setting the VERSION environment variable will change this behavior. - if [ $1 != "dev" ]; then - export VERSION=$1 + if [ -n "$1" ]; then + export VERSION="$1" fi } move_package_to_dist_dir() { - mv Infection_Monkey*.AppImage "$1/$2" + mv InfectionMonkey*.AppImage "$1/$2" } diff --git a/build_scripts/appimage/infection-monkey.desktop b/build_scripts/appimage/infection-monkey.desktop index dcefbb51a..f53feaab9 100644 --- a/build_scripts/appimage/infection-monkey.desktop +++ b/build_scripts/appimage/infection-monkey.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Name=Infection Monkey +Name=InfectionMonkey Exec=bash Comment=An automated breach and attack simulation platform Icon=monkey-icon