Skip to content

Commit

Permalink
chore: add configeditor to renovate and check hash (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
nielm authored Sep 20, 2024
1 parent 247a648 commit fe84d5c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
25 changes: 20 additions & 5 deletions configeditor/build-configeditor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,26 @@ SCRIPTDIR=$(dirname "$0")
cd "$SCRIPTDIR"

npm install --quiet
mkdir -p build/vanilla-jsoneditor
[[ ! -e build/vanilla-jsoneditor/standalone.js ]] && \
curl -o build/vanilla-jsoneditor/standalone.js \
https://cdn.jsdelivr.net/npm/[email protected]/standalone.js

JSONEDITOR_JS=build/vanilla-jsoneditor/standalone.js
# renovate: datasource=npm packageName=vanilla-jsoneditor
JSONEDITOR_VERSION=0.23.8
JSONEDITOR_JS_URL="https://cdn.jsdelivr.net/npm/vanilla-jsoneditor@${JSONEDITOR_VERSION}/standalone.js"
# sha256sum of file at $JSONEDITOR_JS_URL
JSONEDITOR_JS_HASH="81886177f9cab8541f73e02aa195fcea27089acfdf5be48b20ed60f65543f6cf"
if [[ ! -e "$JSONEDITOR_JS" ]]; then
echo "Downloading npm/vanilla-jsoneditor@${JSONEDITOR_VERSION}/standalone.js"
curl -s -o "$JSONEDITOR_JS" "$JSONEDITOR_JS_URL"

# Check sha256sum hash
if ! echo "$JSONEDITOR_JS_HASH $JSONEDITOR_JS" \
| sha256sum --check --quiet ; then
echo ""
echo "FAILED $JSONEDITOR_JS Checksum does not match expected value"
rm "$JSONEDITOR_JS"
exit 1
fi
fi

cp -r ../node_modules/js-yaml ../autoscaler-config.schema.json build/

[[ "$1" == "--quiet" ]] || cat <<EOF
Expand Down
14 changes: 14 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,19 @@
groupName: "docker-containers",
},
],
customManagers: [
{
customType: "regex",
description: "Update _VERSION variables in Dockerfiles, shell scripts",
fileMatch: [
"(^|/|\\.)([Dd]ocker|[Cc]ontainer)file$",
"(^|/)([Dd]ocker|[Cc]ontainer)file[^/]*$",
"(^|/)*.sh",
],
matchStrings: [
'# renovate: datasource=(?<datasource>[a-z-]+?)(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s(?:ENV|ARG)?\\s*.+?_VERSION="?(?<currentValue>.+?)"?\\s',
],
},
],
rangeStrategy: "bump",
}

0 comments on commit fe84d5c

Please sign in to comment.