Make hyprland version a variable for easy replacing. Make script
Some checks failed
Build hyprland-git / Build and push image (push) Failing after 4m47s
Some checks failed
Build hyprland-git / Build and push image (push) Failing after 4m47s
automate more of update process
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user