Determine the base version and build kind using the Debian build branch
authorIstván Váradi <ivaradi@varadiistvan.hu>
Wed, 10 Jul 2024 17:44:32 +0000 (19:44 +0200)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 11 Jul 2024 17:02:36 +0000 (01:02 +0800)
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
admin/linux/debian/drone-build.sh

index 4758fad099575345b760e0633c09e481fa89243b..75ff985591d8f84285e1357e17fff7c41be27406 100755 (executable)
@@ -43,8 +43,19 @@ fi
 set -x
 
 cd "${DRONE_WORKSPACE}"
+git config --global user.email "drone@noemail.invalid"
+git config --global user.name "Drone User"
 git fetch --tags
-read basever revdate kind <<<$(admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog stable)
+
+for distribution in ${UBUNTU_DISTRIBUTIONS} ${DEBIAN_DISTRIBUTIONS}; do
+    git fetch origin debian/dist/${distribution}/${DRONE_TARGET_BRANCH}
+    git checkout origin/debian/dist/${distribution}/${DRONE_TARGET_BRANCH}
+
+    git merge ${DRONE_COMMIT}
+
+    read basever revdate kind <<<$(admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog stable)
+    break
+done
 
 cd "${DRONE_DIR}"
 
@@ -64,8 +75,6 @@ cp -a ${DRONE_WORKSPACE} nextcloud-desktop_${basever}-${revdate}
 tar cjf nextcloud-desktop_${basever}-${revdate}.orig.tar.bz2 --exclude .git --exclude binary nextcloud-desktop_${basever}-${revdate}
 
 cd "${DRONE_WORKSPACE}"
-git config --global user.email "drone@noemail.invalid"
-git config --global user.name "Drone User"
 
 for distribution in ${UBUNTU_DISTRIBUTIONS} ${DEBIAN_DISTRIBUTIONS}; do
     git checkout -- .