From a3074beb7b7fb7a16556bd67d9f8ab3c58cc02bc Mon Sep 17 00:00:00 2001 From: Max Dymond Date: Fri, 15 Dec 2023 23:25:39 +0000 Subject: [PATCH] Specify version information in VERSIONS and use a regex manager for renovate --- renovate.json | 12 +++++++++++- scripts/VERSIONS | 7 +++++++ scripts/download_nghttp2.sh | 6 +++++- scripts/download_openssl.sh | 6 +++++- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 scripts/VERSIONS diff --git a/renovate.json b/renovate.json index 5db72dd6..fcc0bdee 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,16 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:recommended" + "config:best-practices" + ], + "customManagers": [ + { + "customType": "regex", + "fileMatch": ["^scripts/VERSIONS$"], + "matchStrings": [ + "# renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?( registryUrl=(?.*?))?\\s.*?_VERSION=(?.*)\\s" + ], + "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" + } ] } diff --git a/scripts/VERSIONS b/scripts/VERSIONS new file mode 100644 index 00000000..5f371831 --- /dev/null +++ b/scripts/VERSIONS @@ -0,0 +1,7 @@ +#!/bin/bash + +# renovate: datasource=github-tags depName=openssl/openssl versioning=semver registryUrl=https://github.com +OPENSSL_VERSION=openssl-3.2.0 + +# renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com +NGHTTP2_VERSION=v1.58.0 diff --git a/scripts/download_nghttp2.sh b/scripts/download_nghttp2.sh index dafd778d..d3d3f1ed 100755 --- a/scripts/download_nghttp2.sh +++ b/scripts/download_nghttp2.sh @@ -3,5 +3,9 @@ # If any commands fail, fail the script immediately. set -ex +# Get the script directory and source the VERSIONS file +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $SCRIPT_DIR/VERSIONS + # Clone the repository to the specified directory. -git clone --branch v1.58.0 https://github.com/nghttp2/nghttp2 $1 +git clone --depth 1 --branch ${NGHTTP2_VERSION} https://github.com/nghttp2/nghttp2 $1 diff --git a/scripts/download_openssl.sh b/scripts/download_openssl.sh index 720ef3aa..b254125a 100755 --- a/scripts/download_openssl.sh +++ b/scripts/download_openssl.sh @@ -3,5 +3,9 @@ # If any commands fail, fail the script immediately. set -ex +# Get the script directory and source the VERSIONS file +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $SCRIPT_DIR/VERSIONS + # Clone the repository to the specified directory. -git clone --depth 1 --branch openssl-3.2.0 https://github.com/openssl/openssl $1 +git clone --depth 1 --branch ${OPENSSL_VERSION} https://github.com/openssl/openssl $1