Skip to content

Commit 2ab4973

Browse files
authored
Merge pull request #8 from gradle/kdavin/renovate-for-dependencies
kdavin/renovate for dependencies
2 parents 7863989 + 9f559d4 commit 2ab4973

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

.github/renovate.json5

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: [
4+
'config:recommended',
5+
],
6+
customManagers: [
7+
{
8+
customType: 'regex',
9+
description: 'Update _VERSION for 3rd parties gradle plugin',
10+
datasourceTemplate: "maven",
11+
versioningTemplate: "gradle",
12+
packageNameTemplate: "{{packageName}}",
13+
registryUrlTemplate: "https://plugins.gradle.org/m2/",
14+
fileMatch: [ 'ec2-install.sh' ],
15+
matchStrings: [
16+
'# renovate: depName=(?<depName>[^\\s]+) packageName=(?<packageName>[^\\s]+).*\\s*[A-Z_]*VERSION=(?<currentValue>[\\w+\\.\\-]*)\\s*',
17+
],
18+
},
19+
],
20+
postUpgradeTasks: {
21+
commands: ['bash .github/renovate/create_ec2_install_checksum.sh'],
22+
fileFilters: [ 'AWS/EC2/ec2-install.sh', ],
23+
executionMode: 'branch',
24+
},
25+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
# Create sha256 checksum for the installation script
3+
4+
set -Eeuo pipefail
5+
6+
setup_colors() {
7+
if [[ -t 2 ]] && [[ -z "${NO_COLOR-}" ]] && [[ "${TERM-}" != "dumb" ]]; then
8+
NOFORMAT='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' BLUE='\033[0;34m' PURPLE='\033[0;35m' CYAN='\033[0;36m' YELLOW='\033[1;33m'
9+
else
10+
NOFORMAT='' RED='' GREEN='' ORANGE='' BLUE='' PURPLE='' CYAN='' YELLOW=''
11+
fi
12+
}
13+
14+
setup_colors
15+
16+
# Script logic
17+
msg "${YELLOW}Creating checksum${NOFORMAT}"
18+
sha256sum ec2-install.sh > ec2-install.sh.sha256

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

AWS/EC2/ec2-install.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,15 @@ createBuildFile() {
386386
EOL=$'\n' # Define End Of Line
387387

388388
# Content of the settings.gradle.kts file
389-
SETTINGS_CONTENT="
389+
# renovate: depName=com.gradle.develocity packageName=com.gradle.develocity:com.gradle.develocity.gradle.plugin
390+
DEVELOCITY_PLUGIN_VERSION=4.0
391+
# renovate: depName=org.gradle.toolchains.foojay-resolver-convention packageName=org.gradle.toolchains.foojay-resolver-convention:org.gradle.toolchains.foojay-resolver-convention.gradle.plugin
392+
FOOJAY_RESOLVER_VERSION=0.10.0
393+
SETTINGS_CONTENT="
390394
plugins {
391395
// Develocity Gradle Plugin
392-
id(\"com.gradle.develocity\") version \"4.0\"
393-
id(\"org.gradle.toolchains.foojay-resolver-convention\") version \"0.10.0\"
396+
id(\"com.gradle.develocity\") version \"$DEVELOCITY_PLUGIN_VERSION\"
397+
id(\"org.gradle.toolchains.foojay-resolver-convention\") version \"$FOOJAY_RESOLVER_VERSION\"
394398
}$EOL
395399
develocity {
396400
// The hostname of the Develocity instance

0 commit comments

Comments
 (0)