Browse Source

fix: [monujo] allow installation of version 1.0.0

The source repository was not selected correctly because of ``sort
-V`` failing to sort semantic versions.
mattermost
Valentin Lab 1 month ago
parent
commit
66cdb1d994
  1. 13
      monujo/lib/common

13
monujo/lib/common

@ -1,11 +1,11 @@
# -*- mode: shell-script -*-
APP_NAME=monujo
SOURCE_URL="https://docker.0k.io/downloads"
LOCATION="$SERVICE_CONFIGSTORE/opt/apps/$APP_NAME"
CONFIGFILE="$LOCATION/config.json"
version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
version_gt() { test "$(semver "$@" | head -n 1)" != "$1"; }
monujo:get_source_url() {
@ -35,11 +35,14 @@ monujo:code_init() {
fi
fi
if [ -d "$LOCATION" ]; then
find "$LOCATION" -mindepth 1 -delete
find "$LOCATION" -mindepth 1 -delete || return 1
else
mkdir -p "$LOCATION"
mkdir -p "$LOCATION" || return 1
fi
cd "$LOCATION"
cd "$LOCATION" || {
err "Couldn't cd to '$LOCATION'."
return 1
}
source_url="$(monujo:get_source_url "$APP_NAME" "$version")"
info "Downloading '$source_url'."
wget -q "$source_url" -O file.tar.bz2 || {

Loading…
Cancel
Save