mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
M #-: Use one-apps for context download (#3101)
Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org> (cherry picked from commit 10664952de3aeec3b9935b8bff2d44da60e9e6a4)
This commit is contained in:
parent
869b7ce3d2
commit
5303923e79
@ -15,13 +15,11 @@ function get_tag_version {
|
||||
done
|
||||
}
|
||||
|
||||
CONTEXT_API="https://api.github.com/repos/OpenNebula/addon-context-linux/releases"
|
||||
CONTEXT_API_WINDOWS="https://api.github.com/repos/OpenNebula/addon-context-windows/releases"
|
||||
|
||||
CONTEXT_API="https://api.github.com/repos/OpenNebula/one-apps/releases"
|
||||
VERSION=`cat ../../src/im_mad/remotes/VERSION`
|
||||
|
||||
###############################################################################
|
||||
# Download linux packages
|
||||
# Download linux & windows packages
|
||||
###############################################################################
|
||||
|
||||
TAG_VERSION=`get_tag_version $CONTEXT_API`
|
||||
@ -36,18 +34,3 @@ TAG="v$TAG_VERSION"
|
||||
curl -s $CONTEXT_API | \
|
||||
jq -r --arg TAG "$TAG" '.[] | select(.tag_name == $TAG) | .assets[].browser_download_url' | \
|
||||
xargs wget -P .
|
||||
|
||||
###############################################################################
|
||||
# Download windows .msi
|
||||
###############################################################################
|
||||
|
||||
TAG_VERSION=`get_tag_version $CONTEXT_API_WINDOWS`
|
||||
|
||||
# If the current ONE version is greater than every context version the last one is retrieved
|
||||
if [ -z "$TAG_VERSION" ]; then
|
||||
TAG_VERSION=`curl -s $CONTEXT_API_WINDOWS | jq -r '.[0].tag_name' | cut -d 'v' -f 2`
|
||||
fi
|
||||
|
||||
TAG="v$TAG_VERSION"
|
||||
|
||||
wget -P . https://github.com/OpenNebula/addon-context-windows/releases/download/$TAG/one-context-$TAG_VERSION.msi
|
||||
|
Loading…
x
Reference in New Issue
Block a user