Skip to content

Commit

Permalink
tmp: version hacks on update.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Nov 21, 2024
1 parent ed58e85 commit 179af10
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
10 changes: 5 additions & 5 deletions main-ubi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ COPY MariaDB.repo /etc/yum.repos.d/
# https://access.redhat.com/documentation/en-us/red_hat_software_certification/2024/html/red_hat_openshift_software_certification_policy_guide/assembly-requirements-for-container-images_openshift-sw-cert-policy-introduction#con-image-metadata-requirements_openshift-sw-cert-policy-container-images
LABEL name="MariaDB Server" \
vendor="MariaDB Community" \
version="11.7.0" \
version="11.7.1" \
release="Refer to Annotations org.opencontainers.image.{revision,source}" \
summary="MariaDB Database" \
description="MariaDB Database for relational SQL"
Expand All @@ -50,14 +50,14 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \
org.opencontainers.image.licenses="GPL-2.0" \
org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \
org.opencontainers.image.vendor="MariaDB Community" \
org.opencontainers.image.version="11.7.0" \
org.opencontainers.image.version="11.7.1" \
org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker"

# bashbrew-architectures: amd64 arm64v8 ppc64le s390x
ARG MARIADB_VERSION=11.7.0
ARG MARIADB_VERSION=11.7.1
ENV MARIADB_VERSION=$MARIADB_VERSION
# release-status:Alpha
# release-support-type:Unknown
# release-status:RC
# release-support-type:Short Term Support
# (https://downloads.mariadb.org/rest-api/mariadb/)

# missing pwgen(epel), jemalloc(epel) (as entrypoint/user extensions)
Expand Down
2 changes: 1 addition & 1 deletion main-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ docker_create_db_directories() {
}

_mariadb_version() {
echo -n "11.7.0-MariaDB"
echo -n "11.7.1-MariaDB"
}

# initializes the database directory
Expand Down
10 changes: 5 additions & 5 deletions main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \
org.opencontainers.image.licenses="GPL-2.0" \
org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \
org.opencontainers.image.vendor="MariaDB Community" \
org.opencontainers.image.version="11.7.0" \
org.opencontainers.image.version="11.7.1" \
org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker"

# bashbrew-architectures: amd64 arm64v8 ppc64le s390x
ARG MARIADB_VERSION=1:11.7.0+maria~ubu2404
ARG MARIADB_VERSION=1:11.7.1+maria~ubu2404
ENV MARIADB_VERSION $MARIADB_VERSION
# release-status:Alpha
# release-support-type:Unknown
# release-status:RC
# release-support-type:Short Term Support
# (https://downloads.mariadb.org/rest-api/mariadb/)

# Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions
ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.7.0/repo/ubuntu/ noble main main/debug"
ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.7.1/repo/ubuntu/ noble main main/debug"

RUN set -e;\
echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \
Expand Down
2 changes: 1 addition & 1 deletion main/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ docker_create_db_directories() {
}

_mariadb_version() {
echo -n "11.7.0-MariaDB"
echo -n "11.7.1-MariaDB"
}

# initializes the database directory
Expand Down
18 changes: 12 additions & 6 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ update_version_array()

mariaversion()
{
if [ "$version" = main ]; then
#version=11.7
mariaVersion=11.7.1;
return
fi
mariaVersion=$(curl -fsSL "$DOWNLOADS_REST_API/mariadb/${version%-*}" \
| jq -r 'first(.releases[] | .release_id | select(. | test("[0-9]+.[0-9]+.[0-9]+$")))')
mariaVersion=${mariaVersion//\"}
Expand Down Expand Up @@ -228,19 +233,20 @@ for version in "${versions[@]}"; do
ubi=
fi

if [ "${version%-*}" == $development_version ]; then
in_development
continue
fi
if [ ! -d "$version" ]; then
version=${version%.[[:digit:]]*}
else
mariaversion
fi
readarray -t release <<< "$(curl -fsSL "$DOWNLOADS_REST_API/mariadb/" \
| jq -r --arg version "${version%-*}" '.major_releases[] | select(.release_id == $version) | [ .release_status ] , [ .release_support_type ] | @tsv')"
releaseStatus=${release[0]:-Stable}
supportType=${release[1]:-Short Term Support}
if [ "$version" = 'main' ]; then
releaseStatus=${release[0]:-RC}
supportType=${release[1]:-Short Term Support}
else
releaseStatus=${release[0]:-Stable}
supportType=${release[1]:-Short Term Support}
fi

update_version
done

0 comments on commit 179af10

Please sign in to comment.