diff --git a/hyprland-git/hyprland-git.spec b/hyprland-git/hyprland-git.spec index 87bccba..a4386a0 100644 --- a/hyprland-git/hyprland-git.spec +++ b/hyprland-git/hyprland-git.spec @@ -1,8 +1,8 @@ -%global hyprland_commit a5b7c91329313503e8864761f24ef43fb630f35c +%global hyprland_commit 920353370bba555010506a1c0b204675c60362fe %global hyprland_shortcommit %(c=%{hyprland_commit}; echo ${c:0:7}) -%global bumpver 2 -%global commits_count 6697 -%global commit_date Sun Dec 07 09:05:04 2025 +%global bumpver 3 +%global commits_count 6699 +%global commit_date Mon Dec 08 03:04:40 2025 %global protocols_commit 3a5c2bda1c1a4e55cc1330c782547695a93f05b2 %global protocols_shortcommit %(c=%{protocols_commit}; echo ${c:0:7}) @@ -12,8 +12,10 @@ %global libxkbcommon_version 1.11.0 +%global hyprland_version 0.52.2 + Name: hyprland-git -Version: 0.52.2%{?bumpver:^%{bumpver}.git%{hyprland_shortcommit}} +Version: %{hyprland_version}%{?bumpver:^%{bumpver}.git%{hyprland_shortcommit}} Release: %autorelease Summary: Dynamic tiling Wayland compositor that doesn't sacrifice on its looks diff --git a/hyprland-git/update.sh b/hyprland-git/update.sh index e8a1650..910e11e 100755 --- a/hyprland-git/update.sh +++ b/hyprland-git/update.sh @@ -3,6 +3,21 @@ set -euxo pipefail curl_opts=(--connect-timeout 10 --retry 7 --retry-connrefused -Ss -X POST) +oldHyprlandVersion="$(sed -n 's/.*hyprland_version \(.*\)/\1/p' hyprland-git.spec)" +newHyprlandVersion="$(curl -L \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/hyprwm/Hyprland/releases" | jq -r 'first.name' | sed -e "s/^v//")" + +oldBumpVersion="$(sed -n 's/.*bumpver \(.*\)/\1/p' hyprland-git.spec)" +newBumpVersion=oldBumpVersion + +if [[ "$oldHyprlandVersion" == "$newHyprlandVersion" ]]; then + newBumpVersion=$((newBumpVersion+1)) +else + newBumpVersion=1 +fi + oldHyprlandCommit="$(sed -n 's/.*hyprland_commit \(.*\)/\1/p' hyprland-git.spec)" newHyprlandCommit="$(curl -s -H "Accept: application/vnd.github.VERSION.sha" "https://api.github.com/repos/hyprwm/Hyprland/commits/main")" @@ -28,8 +43,10 @@ newUdis86Commit="$(curl -L \ "https://api.github.com/repos/hyprwm/Hyprland/contents/subprojects/udis86?ref=$newHyprlandCommit" | jq -r '.sha')" sed -e "s/$oldHyprlandCommit/$newHyprlandCommit/" \ + -e "/%global bumpver/s/$oldBumpVersion/$newBumpVersion/" \ -e "/%global commits_count/s/$oldCommitsCount/$newCommitsCount/" \ -e "s/$oldCommitDate/$newCommitDate/" \ -e "s/$oldProtocolsCommit/$newProtocolsCommit/" \ -e "s/$oldUdis86Commit/$newUdis86Commit/" \ + -e "/%global hyprland_version/s/$oldHyprlandVersion/$newHyprlandVersion/" \ -i hyprland-git.spec