浏览代码

update dev changelog recognition for updating library

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 5 年之前
父节点
当前提交
185123c58f
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      scripts/buildDev

+ 2 - 3
scripts/buildDev

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