From b8745441c7053e0cad180da34b68ada51f25d588 Mon Sep 17 00:00:00 2001 From: Cloudburst <18114966+C10udburst@users.noreply.github.com> Date: Fri, 19 Aug 2022 13:42:29 +0200 Subject: [PATCH] add json logging and ci error handling --- .github/workflows/jitpack.yml | 5 +++++ .../cloudstream3/gradle/tasks/MakePluginsJsonTask.kt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/jitpack.yml b/.github/workflows/jitpack.yml index 3b4f555..25a2829 100644 --- a/.github/workflows/jitpack.yml +++ b/.github/workflows/jitpack.yml @@ -14,3 +14,8 @@ jobs: run: | wget "https://jitpack.io/com/github/recloudstream/gradle/${GITHUB_REF##*/}-${SHORT_SHA}-1/build.log" -T 300 cat build.log + - name: Check status + run: | + if grep -q "FAILURE: Build failed with an exception." build.log; then + echo "::error::Jitpack build failed with an exception." && exit 1 + fi \ No newline at end of file diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt index 635deb2..cd21e84 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt @@ -33,5 +33,7 @@ abstract class MakePluginsJsonTask : DefaultTask() { .build() ).toPrettyString() ) + + logger.lifecycle("Created ${outputFile.asFile.get()}") } } \ No newline at end of file