Browse Source

Detect dependencies with snapshot

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 4 years ago
parent
commit
38e27420c3

+ 16 - 0
.github/workflows/detectSnaphost.yml

@@ -0,0 +1,16 @@
+name: "Detect snapshot"
+
+on:
+    push:
+        branches: [ master ]
+    pull_request:
+        branches: [ master ]
+
+jobs:
+    detekt:
+        runs-on: ubuntu-latest
+
+        steps:
+            -   uses: actions/checkout@v2
+            -   name: Detect SNAPSHOT
+                run: scripts/analysis/detectSNAPSHOT.sh

+ 1 - 1
.github/workflows/detekt.yml

@@ -16,5 +16,5 @@ jobs:
                 uses: actions/setup-java@v1
                 with:
                     java-version: 1.8
-            -   name: Runt detekt
+            -   name: Run detekt
                 run: ./gradlew detekt

+ 10 - 0
scripts/analysis/detectSNAPSHOT.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+count=$(./gradlew dependencies | grep SNAPSHOT | grep -v "com.github.nextcloud:android-library" -c)
+
+if [ $count -eq 0 ] ; then
+    exit 0
+else
+    exit 1
+fi
+