Skip to content

Commit 6d47a31

Browse files
committed
Update scripts accommodating new plugin
1 parent ff1b1ab commit 6d47a31

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

scripts/generate-dependency-matrix.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ git clone https://github.com/bitrise-io/bitrise-build-cache-cli.git
2020
git clone https://github.com/bitrise-steplib/bitrise-step-activate-gradle-remote-cache.git
2121

2222
export tmp_md="release-table.md"
23-
echo "| Step version | CLI version | Analytics plugin version | Cache plugin version |" >> $tmp_md
24-
echo "|--------------|-------------|--------------------------|----------------------|" >> $tmp_md
23+
echo "| Step version | CLI version | Analytics plugin version | Cache plugin version | Test Distribution plugin version |" >> $tmp_md
24+
echo "|--------------|-------------|--------------------------|----------------------|----------------------------------|" >> $tmp_md
2525

2626

2727
find "bitrise-steplib/steps/activate-build-cache-for-gradle" -mindepth 1 -maxdepth 1 -type d | while read -r dir; do
@@ -52,7 +52,7 @@ sort -Vr | while read -r step_version; do
5252
cd ../bitrise-build-cache-cli
5353
git checkout "$cli_version"
5454

55-
go run main.go enable-for gradle
55+
go run main.go activate-for gradle --cache --test-distribution
5656

5757
if [ ! -f "$HOME/.gradle/init.d/bitrise-build-cache.init.gradle.kts" ]; then
5858
echo "Gradle build cache not enabled in $HOME/.gradle/init.d/bitrise-build-cache.init.gradle.kts"
@@ -62,11 +62,12 @@ sort -Vr | while read -r step_version; do
6262

6363
analytics_version=$(grep 'classpath("io.bitrise.gradle:gradle-analytics:' "$HOME/.gradle/init.d/bitrise-build-cache.init.gradle.kts" | sed -n -E 's/.*gradle-analytics:([0-9]+\.[0-9]+\.[0-9]+).*/\1/p')
6464
cache_version=$(grep 'classpath("io.bitrise.gradle:remote-cache:' "$HOME/.gradle/init.d/bitrise-build-cache.init.gradle.kts" | sed -n -E 's/.*remote-cache:([0-9]+\.[0-9]+\.[0-9]+).*/\1/p')
65+
test_distro_version=$(grep 'classpath("io.bitrise.gradle:test-distribution:' "$HOME/.gradle/init.d/bitrise-build-cache.init.gradle.kts" | sed -n -E 's/.*test-distribution:([0-9]+\.[0-9]+\.[0-9]+).*/\1/p')
6566

66-
echo "Gradle build cache enabled with analytics version: $analytics_version and cache version: $cache_version"
67+
echo "Gradle build cache enabled with analytics version: $analytics_version, cache version: $cache_version, test-distribution version: $test_distro_version"
6768
cd ..
6869

69-
echo "| $step_version | [$cli_version]($CLI_RELEASE_URL_PREFIX/$cli_version) | $analytics_version | $cache_version |" >> $tmp_md
70+
echo "| $step_version | [$cli_version]($CLI_RELEASE_URL_PREFIX/$cli_version) | $analytics_version | $cache_version | $test_distro_version |" >> $tmp_md
7071
done
7172

7273
popd

scripts/update_plugins.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
set -e
33

44
VERSION_FILE="./internal/consts/consts.go"
5-
TEST_FILE="./internal/config/gradle/gradleconfig_test.go"
65

76
SED_IN_PLACE_COMMAND=(-i)
87
if [[ "$OSTYPE" == "darwin"* ]]; then
@@ -45,7 +44,6 @@ update() {
4544
# Compare versions and update if the latest is greater
4645
if compare_versions "$current_version" "$latest_version"; then
4746
sed "${SED_IN_PLACE_COMMAND[@]}" "s/$dep_version_name = \".*\"/$dep_version_name = \"$latest_version\"/" "$VERSION_FILE"
48-
sed "${SED_IN_PLACE_COMMAND[@]}" "s/classpath(\"io.bitrise.gradle:$artifact_name:.*\")/classpath(\"io.bitrise.gradle:$artifact_name:$latest_version\")/" "$TEST_FILE"
4947
echo "Updated to version $latest_version"
5048
else
5149
echo "No update needed. Current version ($current_version) is up-to-date or newer."

0 commit comments

Comments
 (0)