diff --git a/app/build.gradle b/app/build.gradle index c8ea5a25..8a6b25ea 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,6 +6,7 @@ apply plugin: 'io.fabric' apply plugin: 'com.github.triplet.play' apply from: 'jacoco.gradle' apply from: 'sonarqube.gradle' +apply from: 'hooks.gradle' android { compileSdkVersion 28 diff --git a/app/hooks.gradle b/app/hooks.gradle new file mode 100644 index 00000000..038fa9fb --- /dev/null +++ b/app/hooks.gradle @@ -0,0 +1,10 @@ +apply plugin: "com.star-zero.gradle.githook" + +githook { + failOnMissingHooksDir = false + hooks { + "pre-push" { + shell = "./app/play-publish-lint.sh" + } + } +} diff --git a/app/play-publish-lint.sh b/app/play-publish-lint.sh new file mode 100755 index 00000000..d3354b1a --- /dev/null +++ b/app/play-publish-lint.sh @@ -0,0 +1,7 @@ +#!/bin/bash - + +content=$(cat < "app/src/main/play/release-notes/pl-PL/default.txt") || exit +if [[ "${#content}" -gt 500 ]]; then + echo >&2 "Release notes content has reached the limit of 500 characters" + exit 1 +fi diff --git a/app/src/main/play/release-notes/pl-PL/default.txt b/app/src/main/play/release-notes/pl-PL/default.txt index 7fe143d8..e2048e1f 100644 --- a/app/src/main/play/release-notes/pl-PL/default.txt +++ b/app/src/main/play/release-notes/pl-PL/default.txt @@ -2,7 +2,7 @@ Wersja 0.9.0 Dodaliśmy: - zarządzanie dostępem mobilnym do dziennika -- wyświetlanie sumy punktów (jeśli dziennik obsługuje) +- wyświetlanie sumy punktów - wyświetlanie informacji o wygasłej sesji, gdy zostanie zmienione hasło Naprawiliśmy: diff --git a/build.gradle b/build.gradle index 4ed9ec68..ac8a0926 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ buildscript { classpath "io.fabric.tools:gradle:1.29.0" classpath "com.github.triplet.gradle:play-publisher:2.2.1" classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1" + classpath "gradle.plugin.com.star-zero.gradle:githook:1.1.0" } }