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.
Valentin Lab 1 day ago
parent
commit
1816b2f32c
  1. 11
      monujo/lib/common

11
monujo/lib/common

@ -5,7 +5,7 @@ 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 "$(printf '%s\n' "$@" | xargs 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