2023-07-19 23:24:10 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
dir="$(find . -maxdepth 1 -type d -name "intellij-idea-*")"
|
|
|
|
pushd "$dir" || exit 1
|
|
|
|
|
2023-07-26 19:54:42 +02:00
|
|
|
set +e
|
2023-07-19 23:24:10 +02:00
|
|
|
check="$(uscan --dehs --no-download)"
|
2023-07-26 19:54:42 +02:00
|
|
|
set -e
|
|
|
|
|
2023-07-19 23:24:10 +02:00
|
|
|
status="$(echo "$check" | xmllint --xpath 'string(/dehs/status)' -)"
|
|
|
|
|
|
|
|
if [[ "$status" != "newer package available" ]]; then
|
|
|
|
echo "No newer package available."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
new_version="$(echo "$check" | xmllint --xpath 'string(/dehs/upstream-version)' -)"
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
2023-07-26 19:47:13 +02:00
|
|
|
./update-new-version.sh "$new_version"
|
2023-07-26 19:33:15 +02:00
|
|
|
|
|
|
|
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
|