File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,24 @@ smithy-build:
30
30
smithy-clean :
31
31
cd codegen && ./gradlew clean
32
32
33
+ GRADLE_RETRIES := 3
34
+ GRADLE_SLEEP := 2
35
+
36
+ # We're making a call to ./gradlew to trigger downloading Gradle and
37
+ # starting the daemon. Any call works, so using `./gradlew help`
38
+ ensure-gradle-up :
39
+ @cd codegen && for i in $( shell seq 1 $( GRADLE_RETRIES) ) ; do \
40
+ echo " Checking if Gradle daemon is up, attempt $$ i..." ; \
41
+ if ./gradlew help ; then \
42
+ echo " Gradle daemon is up!" ; \
43
+ exit 0; \
44
+ fi ; \
45
+ echo " Failed to start Gradle, retrying in $( GRADLE_SLEEP) seconds..." ; \
46
+ sleep $(GRADLE_SLEEP ) ; \
47
+ done ; \
48
+ echo " Failed to start Gradle after $( GRADLE_RETRIES) attempts." ; \
49
+ exit 1
50
+
33
51
# #################
34
52
# Linting/Verify #
35
53
# #################
You can’t perform that action at this time.
0 commit comments