Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to pick prod package for mariner #119

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions linux/installation/mde_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -570,14 +570,22 @@ install_on_mariner()
local repo=
local effective_distro=

# default repo file for all preview rings (dogfood / insiders-fast / insiders-slow)
local repo_file=mariner-repos-extras-preview

if check_if_pkg_is_installed mdatp; then
pkg_version=$($MDE_VERSION_CMD) || script_exit "Unable to fetch the app version. Please upgrade to latest version $?" $ERR_INSTALLATION_FAILED
log_info "[i] MDE already installed ($pkg_version)"
return
fi

### Add Preview Repo File ###
tdnf -y install mariner-repos-extras-preview
# set the correct repo file for prod
if [[ "$CHANNEL" = "prod" ]]; then
repo_file=mariner-repos-extras-prod
fi

### Add Repo File ###
tdnf -y install "$repo_file"

### Install MDE ###
log_info "[>] installing MDE"
Expand Down Expand Up @@ -823,7 +831,7 @@ scale_version_id()
fi
elif [ "$DISTRO_FAMILY" == "mariner" ]; then
if [[ $VERSION == 2* ]]; then
SCALED_VERSION=2
SCALED_VERSION=2.0
else
script_exit "unsupported version: $DISTRO $VERSION" $ERR_UNSUPPORTED_VERSION
fi
Expand Down