♻ (autoupdate) Move auto update git code to autoupdate.sh

This commit is contained in:
Marcel Kapfer 2023-07-26 20:00:52 +02:00
parent 845b4eb1c4
commit 98b6be28d4
2 changed files with 16 additions and 26 deletions

View file

@ -5,7 +5,10 @@ set -euo pipefail
dir="$(find . -maxdepth 1 -type d -name "intellij-idea-*")"
pushd "$dir" || exit 1
set +e
check="$(uscan --dehs --no-download)"
set -e
status="$(echo "$check" | xmllint --xpath 'string(/dehs/status)' -)"
if [[ "$status" != "newer package available" ]]; then
@ -17,4 +20,14 @@ new_version="$(echo "$check" | xmllint --xpath 'string(/dehs/upstream-version)'
popd
./update-new-version.sh --autoupdate "$new_version"
./update-new-version.sh "$new_version"
git add -A
git commit -m "Upstream version $new_version"
git switch main
git merge --ff-only version-"$new_version"
git push origin main
git tag -a v"$new_version" -m "Upstream version $new_version"
git push --tags origin main