forked from p15670423/monkey
Build: Fix AppImage package version
This commit is contained in:
parent
2d701e45df
commit
2f88de6f08
|
@ -108,8 +108,9 @@ build_package() {
|
||||||
local dist_dir=$2
|
local dist_dir=$2
|
||||||
|
|
||||||
log_message "Building AppImage"
|
log_message "Building AppImage"
|
||||||
pushd "$APPIMAGE_DIR"
|
set_version "$version"
|
||||||
|
|
||||||
|
pushd "$APPIMAGE_DIR"
|
||||||
ARCH="x86_64" linuxdeploy \
|
ARCH="x86_64" linuxdeploy \
|
||||||
--appdir "$APPIMAGE_DIR/squashfs-root" \
|
--appdir "$APPIMAGE_DIR/squashfs-root" \
|
||||||
--icon-file "$ICON_PATH" \
|
--icon-file "$ICON_PATH" \
|
||||||
|
@ -118,15 +119,19 @@ build_package() {
|
||||||
--deploy-deps-only="$MONGO_PATH/bin/mongod"\
|
--deploy-deps-only="$MONGO_PATH/bin/mongod"\
|
||||||
--output appimage
|
--output appimage
|
||||||
|
|
||||||
apply_version_to_appimage "$version"
|
|
||||||
move_package_to_dist_dir $dist_dir
|
move_package_to_dist_dir $dist_dir
|
||||||
|
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_version_to_appimage() {
|
set_version() {
|
||||||
log_message "Renaming Infection_Monkey-x86_64.AppImage -> Infection_Monkey-$1-x86_64.AppImage"
|
# The linuxdeploy and appimage-builder tools will use the commit hash of the
|
||||||
mv "Infection_Monkey-x86_64.AppImage" "Infection_Monkey-$1-x86_64.AppImage"
|
# 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
|
||||||
|
# setting the VERSION environment variable will change this behavior.
|
||||||
|
if [ $1 != "dev" ]; then
|
||||||
|
export VERSION=$1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
move_package_to_dist_dir() {
|
move_package_to_dist_dir() {
|
||||||
|
|
Loading…
Reference in New Issue