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
This commit is contained in:
VakarisZ 2021-10-18 17:33:19 +03:00 committed by Ilija Lazoroski
parent 65f7fd0131
commit 226c72df5f
2 changed files with 12 additions and 7 deletions

View File

@ -119,7 +119,12 @@ build_package() {
--deploy-deps-only="$MONGO_PATH/bin/mongod"\
--output 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"
}

View File

@ -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