Browse Source

update dev changelog recognition for updating library

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 5 years ago
parent
commit
185123c58f
1 changed files with 2 additions and 3 deletions
  1. 2 3
      scripts/buildDev

+ 2 - 3
scripts/buildDev

@@ -1,5 +1,6 @@
 #!/bin/bash
 date=$(date +%Y%m%d)
+oldLibraryCommit=$(grep "androidLibraryVersion\ =" build.gradle)
 libraryCommit=$(curl https://api.github.com/repos/nextcloud/android-library/commits/master | jq .sha | sed s'/\"//g')
 
 # use current date for version code/name
@@ -50,10 +51,8 @@ if echo "$changelog" | grep -q 'tx-robot'; then
 	changelog="${changelog}"$'\nUpdate translations'
 fi
 
-libraryCommit=$(curl https://api.github.com/repos/nextcloud/android-library/commits/master | jq .sha | sed s'/\"//g')
-
 # Check if the library was updated
-if ! grep -q libraryCommit build.gradle; then
+if ! echo $oldLibraryCommit | grep -q $libraryCommit; then
 	changelog="${changelog}"$'\nUpdate Nextcloud Android library'
 fi