mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-09-21 14:27:51 +00:00
Compare commits
4
Commits
v1.12.4
...
322b93efa1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
322b93efa1 | ||
|
|
683f4127a0 | ||
|
|
c873166e21 | ||
|
|
ec4e873071 |
@@ -24,7 +24,7 @@ jobs:
|
|||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install aiohttp toml
|
run: pip install aiohttp tomlkit
|
||||||
|
|
||||||
- name: Generate cargo-sources.json
|
- name: Generate cargo-sources.json
|
||||||
run: bash ./scripts/generate-sources.sh
|
run: bash ./scripts/generate-sources.sh
|
||||||
|
|||||||
Generated
+13
-13
@@ -839,7 +839,7 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
"option-ext",
|
"option-ext",
|
||||||
"redox_users",
|
"redox_users",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1184,7 +1184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3476,9 +3476,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rust-i18n"
|
name = "rust-i18n"
|
||||||
version = "4.1.0"
|
version = "4.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "55691a65892c33ee2de49c15ea5600c6f4a70e8eeb8e6c3cd96d2a231d230c40"
|
checksum = "752c95174ef2555cd95873d6f12d0bee9f0a1dcbf1b631dde847053a29174996"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"globwalk",
|
"globwalk",
|
||||||
"regex",
|
"regex",
|
||||||
@@ -3489,9 +3489,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rust-i18n-macro"
|
name = "rust-i18n-macro"
|
||||||
version = "4.1.0"
|
version = "4.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "30de488acadcf767d97cd48518a8da8ea9777b1c9a5beca4eab78bbf77d07309"
|
checksum = "cc99fd028c912b59841bd745ec11c2dda112549ae6de25a850f384bb59d1a8f8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glob",
|
"glob",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -3505,9 +3505,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rust-i18n-support"
|
name = "rust-i18n-support"
|
||||||
version = "4.1.0"
|
version = "4.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "aea0fef8a93c06326b66392c95a115120e609674cb2132d37d276a6b05b545b4"
|
checksum = "3dfb30689b70c7fd955e8e5c709fa055a778ae024ef6a382c4eb425dd2c2fabb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
"base62",
|
"base62",
|
||||||
@@ -3566,7 +3566,7 @@ dependencies = [
|
|||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys 0.12.1",
|
"linux-raw-sys 0.12.1",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3906,7 +3906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51"
|
checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.60.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4219,7 +4219,7 @@ dependencies = [
|
|||||||
"getrandom 0.4.3",
|
"getrandom 0.4.3",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix 1.1.4",
|
"rustix 1.1.4",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4551,7 +4551,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"memoffset",
|
"memoffset",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.60.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -5051,7 +5051,7 @@ version = "0.1.11"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ package() {
|
|||||||
|
|
||||||
install -Dm644 "$_srcsrc/pwsp-gui/assets/pwsp-gui.desktop" "${pkgdir}/usr/share/applications/pwsp-gui.desktop"
|
install -Dm644 "$_srcsrc/pwsp-gui/assets/pwsp-gui.desktop" "${pkgdir}/usr/share/applications/pwsp-gui.desktop"
|
||||||
install -Dm644 "$_srcsrc/pwsp-gui/assets/icon.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/pwsp.png"
|
install -Dm644 "$_srcsrc/pwsp-gui/assets/icon.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/pwsp.png"
|
||||||
install -Dm644 "$_srcsrc/pwsp-gui/assets/pwsp-daemon.service" "${pkgdir}/usr/lib/systemd/user/pwsp-daemon.service"
|
install -Dm644 "$_srcsrc/pwsp-daemon/assets/pwsp-daemon.service" "${pkgdir}/usr/lib/systemd/user/pwsp-daemon.service"
|
||||||
|
|
||||||
install -Dm644 "$_srcsrc/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
install -Dm644 "$_srcsrc/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ package() {
|
|||||||
install -Dm644 "pwsp-gui/assets/pwsp-gui.desktop" "${pkgdir}/usr/share/applications/pwsp-gui.desktop"
|
install -Dm644 "pwsp-gui/assets/pwsp-gui.desktop" "${pkgdir}/usr/share/applications/pwsp-gui.desktop"
|
||||||
install -Dm644 "pwsp-gui/assets/icon.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/pwsp.png"
|
install -Dm644 "pwsp-gui/assets/icon.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/pwsp.png"
|
||||||
|
|
||||||
install -Dm644 "pwsp-gui/assets/pwsp-daemon.service" "${pkgdir}/usr/lib/systemd/user/pwsp-daemon.service"
|
install -Dm644 "pwsp-daemon/assets/pwsp-daemon.service" "${pkgdir}/usr/lib/systemd/user/pwsp-daemon.service"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4329,40 +4329,40 @@
|
|||||||
{
|
{
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"archive-type": "tar-gzip",
|
"archive-type": "tar-gzip",
|
||||||
"url": "https://static.crates.io/crates/rust-i18n/rust-i18n-4.1.0.crate",
|
"url": "https://static.crates.io/crates/rust-i18n/rust-i18n-4.2.0.crate",
|
||||||
"sha256": "55691a65892c33ee2de49c15ea5600c6f4a70e8eeb8e6c3cd96d2a231d230c40",
|
"sha256": "752c95174ef2555cd95873d6f12d0bee9f0a1dcbf1b631dde847053a29174996",
|
||||||
"dest": "cargo/vendor/rust-i18n-4.1.0"
|
"dest": "cargo/vendor/rust-i18n-4.2.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "inline",
|
"type": "inline",
|
||||||
"contents": "{\"package\": \"55691a65892c33ee2de49c15ea5600c6f4a70e8eeb8e6c3cd96d2a231d230c40\", \"files\": {}}",
|
"contents": "{\"package\": \"752c95174ef2555cd95873d6f12d0bee9f0a1dcbf1b631dde847053a29174996\", \"files\": {}}",
|
||||||
"dest": "cargo/vendor/rust-i18n-4.1.0",
|
"dest": "cargo/vendor/rust-i18n-4.2.0",
|
||||||
"dest-filename": ".cargo-checksum.json"
|
"dest-filename": ".cargo-checksum.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"archive-type": "tar-gzip",
|
"archive-type": "tar-gzip",
|
||||||
"url": "https://static.crates.io/crates/rust-i18n-macro/rust-i18n-macro-4.1.0.crate",
|
"url": "https://static.crates.io/crates/rust-i18n-macro/rust-i18n-macro-4.2.0.crate",
|
||||||
"sha256": "30de488acadcf767d97cd48518a8da8ea9777b1c9a5beca4eab78bbf77d07309",
|
"sha256": "cc99fd028c912b59841bd745ec11c2dda112549ae6de25a850f384bb59d1a8f8",
|
||||||
"dest": "cargo/vendor/rust-i18n-macro-4.1.0"
|
"dest": "cargo/vendor/rust-i18n-macro-4.2.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "inline",
|
"type": "inline",
|
||||||
"contents": "{\"package\": \"30de488acadcf767d97cd48518a8da8ea9777b1c9a5beca4eab78bbf77d07309\", \"files\": {}}",
|
"contents": "{\"package\": \"cc99fd028c912b59841bd745ec11c2dda112549ae6de25a850f384bb59d1a8f8\", \"files\": {}}",
|
||||||
"dest": "cargo/vendor/rust-i18n-macro-4.1.0",
|
"dest": "cargo/vendor/rust-i18n-macro-4.2.0",
|
||||||
"dest-filename": ".cargo-checksum.json"
|
"dest-filename": ".cargo-checksum.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"archive-type": "tar-gzip",
|
"archive-type": "tar-gzip",
|
||||||
"url": "https://static.crates.io/crates/rust-i18n-support/rust-i18n-support-4.1.0.crate",
|
"url": "https://static.crates.io/crates/rust-i18n-support/rust-i18n-support-4.2.0.crate",
|
||||||
"sha256": "aea0fef8a93c06326b66392c95a115120e609674cb2132d37d276a6b05b545b4",
|
"sha256": "3dfb30689b70c7fd955e8e5c709fa055a778ae024ef6a382c4eb425dd2c2fabb",
|
||||||
"dest": "cargo/vendor/rust-i18n-support-4.1.0"
|
"dest": "cargo/vendor/rust-i18n-support-4.2.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "inline",
|
"type": "inline",
|
||||||
"contents": "{\"package\": \"aea0fef8a93c06326b66392c95a115120e609674cb2132d37d276a6b05b545b4\", \"files\": {}}",
|
"contents": "{\"package\": \"3dfb30689b70c7fd955e8e5c709fa055a778ae024ef6a382c4eb425dd2c2fabb\", \"files\": {}}",
|
||||||
"dest": "cargo/vendor/rust-i18n-support-4.1.0",
|
"dest": "cargo/vendor/rust-i18n-support-4.2.0",
|
||||||
"dest-filename": ".cargo-checksum.json"
|
"dest-filename": ".cargo-checksum.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,7 +68,16 @@ install -Dm755 target/release/pwsp-gui %{buildroot}%{_bindir}/pwsp-gui
|
|||||||
install -Dm644 pwsp-gui/assets/pwsp-gui.desktop %{buildroot}%{_datadir}/applications/pwsp.desktop
|
install -Dm644 pwsp-gui/assets/pwsp-gui.desktop %{buildroot}%{_datadir}/applications/pwsp.desktop
|
||||||
install -Dm644 pwsp-gui/assets/icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/pwsp.png
|
install -Dm644 pwsp-gui/assets/icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/pwsp.png
|
||||||
|
|
||||||
install -Dm644 pwsp-gui/assets/pwsp-daemon.service %{buildroot}/usr/lib/systemd/user/pwsp-daemon.service
|
install -Dm644 pwsp-daemon/assets/pwsp-daemon.service %{buildroot}/usr/lib/systemd/user/pwsp-daemon.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_user_post pwsp-daemon.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_user_preun pwsp-daemon.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_user_postun_with_restart pwsp-daemon.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|||||||
+10
-1
@@ -68,7 +68,16 @@ install -Dm755 target/release/pwsp-gui %{buildroot}%{_bindir}/pwsp-gui
|
|||||||
install -Dm644 pwsp-gui/assets/pwsp-gui.desktop %{buildroot}%{_datadir}/applications/pwsp.desktop
|
install -Dm644 pwsp-gui/assets/pwsp-gui.desktop %{buildroot}%{_datadir}/applications/pwsp.desktop
|
||||||
install -Dm644 pwsp-gui/assets/icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/pwsp.png
|
install -Dm644 pwsp-gui/assets/icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/pwsp.png
|
||||||
|
|
||||||
install -Dm644 pwsp-gui/assets/pwsp-daemon.service %{buildroot}/usr/lib/systemd/user/pwsp-daemon.service
|
install -Dm644 pwsp-daemon/assets/pwsp-daemon.service %{buildroot}/usr/lib/systemd/user/pwsp-daemon.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_user_post pwsp-daemon.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_user_preun pwsp-daemon.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_user_postun_with_restart pwsp-daemon.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Pipewire Soundpad Daemon
|
||||||
|
Requires=pipewire.service
|
||||||
|
After=pipewire.service
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/pwsp-daemon
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=3
|
||||||
|
RuntimeDirectory=pwsp
|
||||||
|
SyslogIdentifier=pwsp-daemon
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
+2
-1
@@ -38,6 +38,7 @@ percent-encoding.workspace = true
|
|||||||
name = "pwsp"
|
name = "pwsp"
|
||||||
section = "sound"
|
section = "sound"
|
||||||
priority = "optional"
|
priority = "optional"
|
||||||
|
maintainer-scripts = "maintainer-scripts"
|
||||||
assets = [
|
assets = [
|
||||||
[
|
[
|
||||||
"target/release/pwsp-daemon",
|
"target/release/pwsp-daemon",
|
||||||
@@ -65,7 +66,7 @@ assets = [
|
|||||||
"644",
|
"644",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"assets/pwsp-daemon.service",
|
"../pwsp-daemon/assets/pwsp-daemon.service",
|
||||||
"usr/lib/systemd/user/pwsp-daemon.service",
|
"usr/lib/systemd/user/pwsp-daemon.service",
|
||||||
"644",
|
"644",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Pipewire Soundpad Daemon
|
|
||||||
After=pipewire.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/pwsp-daemon
|
|
||||||
Restart=no
|
|
||||||
RuntimeDirectory=pwsp
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
Executable
+21
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ]; then
|
||||||
|
if [ -x "/usr/bin/systemctl" ]; then
|
||||||
|
systemctl --global enable pwsp-daemon.service || true
|
||||||
|
|
||||||
|
for uid_dir in /run/user/*; do
|
||||||
|
if [ -d "$uid_dir/systemd" ]; then
|
||||||
|
uid=$(basename "$uid_dir")
|
||||||
|
if [ "$uid" != "0" ]; then
|
||||||
|
username=$(id -un "$uid" 2>/dev/null) || continue
|
||||||
|
su -s /bin/sh -c "XDG_RUNTIME_DIR=$uid_dir systemctl --user daemon-reload" "$username" || true
|
||||||
|
su -s /bin/sh -c "XDG_RUNTIME_DIR=$uid_dir systemctl --user try-restart pwsp-daemon.service" "$username" || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ]; then
|
||||||
|
if [ -x "/usr/bin/systemctl" ]; then
|
||||||
|
for uid_dir in /run/user/*; do
|
||||||
|
if [ -d "$uid_dir/systemd" ]; then
|
||||||
|
uid=$(basename "$uid_dir")
|
||||||
|
if [ "$uid" != "0" ]; then
|
||||||
|
username=$(id -un "$uid" 2>/dev/null) || continue
|
||||||
|
su -s /bin/sh -c "XDG_RUNTIME_DIR=$uid_dir systemctl --user daemon-reload" "$username" || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
|
||||||
|
if [ -x "/usr/bin/systemctl" ]; then
|
||||||
|
systemctl --global disable pwsp-daemon.service || true
|
||||||
|
|
||||||
|
for uid_dir in /run/user/*; do
|
||||||
|
if [ -d "$uid_dir/systemd" ]; then
|
||||||
|
uid=$(basename "$uid_dir")
|
||||||
|
if [ "$uid" != "0" ]; then
|
||||||
|
username=$(id -un "$uid" 2>/dev/null) || continue
|
||||||
|
su -s /bin/sh -c "XDG_RUNTIME_DIR=$uid_dir systemctl --user stop pwsp-daemon.service" "$username" || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -27,18 +27,18 @@ with open(cargo_toml_path, "r", encoding="utf-8") as f:
|
|||||||
|
|
||||||
# We want to match version in [workspace.package]
|
# We want to match version in [workspace.package]
|
||||||
# First, let's find the [workspace.package] section
|
# First, let's find the [workspace.package] section
|
||||||
workspace_package_match = re.search(
|
workspace_package_match = re.search(r"\[workspace\.package\](.*?)(?=\n\[|$)", cargo_toml_content, re.DOTALL)
|
||||||
r"\[workspace\.package\](.*?)(?=\n\[|$)", cargo_toml_content, re.DOTALL
|
|
||||||
)
|
|
||||||
if not workspace_package_match:
|
if not workspace_package_match:
|
||||||
fatal("Could not find [workspace.package] section in Cargo.toml.")
|
fatal("Could not find [workspace.package] section in Cargo.toml.")
|
||||||
|
|
||||||
workspace_package_sec = workspace_package_match.group(1)
|
if isinstance(workspace_package_match, re.Match):
|
||||||
|
workspace_package_sec = workspace_package_match.group(1)
|
||||||
version_match = re.search(r'version\s*=\s*"([^"]+)"', workspace_package_sec)
|
version_match = re.search(r'version\s*=\s*"([^"]+)"', workspace_package_sec)
|
||||||
if not version_match:
|
if not version_match:
|
||||||
fatal("Could not find version in [workspace.package] in Cargo.toml.")
|
fatal("Could not find version in [workspace.package] in Cargo.toml.")
|
||||||
|
|
||||||
current_version = version_match.group(1)
|
if isinstance(version_match, re.Match):
|
||||||
|
current_version = version_match.group(1)
|
||||||
print(f"Current version detected: {current_version}")
|
print(f"Current version detected: {current_version}")
|
||||||
|
|
||||||
# Get new version
|
# Get new version
|
||||||
@@ -62,9 +62,7 @@ print("Updating Cargo.toml...")
|
|||||||
|
|
||||||
def replace_version_in_workspace(match):
|
def replace_version_in_workspace(match):
|
||||||
section_content = match.group(1)
|
section_content = match.group(1)
|
||||||
updated_section_content = re.sub(
|
updated_section_content = re.sub(r'(version\s*=\s*")[^"]+(")', rf"\g<1>{new_version}\g<2>", section_content)
|
||||||
r'(version\s*=\s*")[^"]+(")', rf"\g<1>{new_version}\g<2>", section_content
|
|
||||||
)
|
|
||||||
return f"[workspace.package]{updated_section_content}"
|
return f"[workspace.package]{updated_section_content}"
|
||||||
|
|
||||||
|
|
||||||
@@ -127,9 +125,7 @@ def update_srcinfo(directory, pkgbuild_path, srcinfo_path):
|
|||||||
f.write(result.stdout)
|
f.write(result.stdout)
|
||||||
return
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(
|
print(f"Warning: makepkg failed in {directory}: {e}. Falling back to text replacement.")
|
||||||
f"Warning: makepkg failed in {directory}: {e}. Falling back to text replacement."
|
|
||||||
)
|
|
||||||
|
|
||||||
# Text replacement fallback
|
# Text replacement fallback
|
||||||
with open(srcinfo_path, "r", encoding="utf-8") as f:
|
with open(srcinfo_path, "r", encoding="utf-8") as f:
|
||||||
@@ -142,9 +138,7 @@ def update_srcinfo(directory, pkgbuild_path, srcinfo_path):
|
|||||||
|
|
||||||
|
|
||||||
update_srcinfo("packages/aur/bin", pkgbuild_bin_path, "packages/aur/bin/.SRCINFO")
|
update_srcinfo("packages/aur/bin", pkgbuild_bin_path, "packages/aur/bin/.SRCINFO")
|
||||||
update_srcinfo(
|
update_srcinfo("packages/aur/standart", pkgbuild_std_path, "packages/aur/standart/.SRCINFO")
|
||||||
"packages/aur/standart", pkgbuild_std_path, "packages/aur/standart/.SRCINFO"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 4. Update packages/flatpak/ru.arabianq.pwsp.metainfo.xml
|
# 4. Update packages/flatpak/ru.arabianq.pwsp.metainfo.xml
|
||||||
flatpak_xml_path = "packages/flatpak/ru.arabianq.pwsp.metainfo.xml"
|
flatpak_xml_path = "packages/flatpak/ru.arabianq.pwsp.metainfo.xml"
|
||||||
|
|||||||
Reference in New Issue
Block a user