fix prep name

This commit is contained in:
windowsboy111
2023-06-13 18:44:42 +08:00
parent 16dac0c12c
commit 6fd17f2cba
2 changed files with 5 additions and 4 deletions
@@ -6,9 +6,11 @@
%global plug_name wallet
%global plug_rdnn io.elementary.switchboard.wallet
%global commit bfe73dfb95d9b46a0a34e0db35a178233c8552b0
Name: switchboard-plug-wallet
Summary: Switchboard Wallet Plug
Version: bfe73df
Version: %(c=%commit; echo ${c:0:7})
Release: 1%?dist
License: GPL-3.0-or-later
@@ -33,7 +35,7 @@ Manage Payment Methods and related settings.
%prep
%autosetup -n %{srcname}-%{version} -p1
%autosetup -n %srcname-%commit -p1
%build
@@ -1,4 +1,3 @@
let req = new_req("https://api.github.com/repos/elementary/switchboard-plug-wallet/commits/HEAD");
req.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`);
let sha = json(req.get()).sha;
rpm.version(sha.sub_string(0, 7));
rpm.global("commit", json(req.get()).sha);