Let us no longer create java files

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Co-authored-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2022-04-07 11:51:01 +02:00
parent 86ee9dff69
commit 7817a3b8d5
No known key found for this signature in database
GPG Key ID: 0E00D4D47D0C5AF7
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,15 @@
name: "Detect new java files"
on:
pull_request:
branches: [ master, stable-* ]
jobs:
detectNewJavaFiles:
runs-on: ubuntu-latest
steps:
- uses: trilom/file-changes-action@v1.2.3
- uses: actions/checkout@v2
- name: Detect new java files
run: scripts/analysis/detectNewJavaFiles.sh

View File

@ -0,0 +1,11 @@
#!/bin/bash
count=$(grep \.java\" -c "$HOME"/files_added.json)
if [ "$count" -eq 0 ] ; then
exit 0
else
echo "New Java files detected! Please use Kotlin for new files. Number of new Java files: $count"
exit 1
fi