Skip to content

Commit 1d2799b

Browse files
committed
update to 0.9.13
1 parent f899a65 commit 1d2799b

6 files changed

Lines changed: 95 additions & 38 deletions

File tree

Cargo.lock

Lines changed: 49 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wayscriber"
3-
version = "0.9.12"
3+
version = "0.9.13"
44
edition = "2024"
55
description = "Screen annotation tool for Wayland compositors"
66
homepage = "https://wayscriber.com"

configurator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wayscriber-configurator"
3-
version = "0.9.12"
3+
version = "0.9.13"
44
edition = "2024"
55

66
[dependencies]

packaging/.SRCINFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pkgbase = wayscriber
22
pkgdesc = Screen annotation tool for Wayland compositors
3-
pkgver = 0.9.12
3+
pkgver = 0.9.13
44
pkgrel = 1
55
url = https://wayscriber.com
66
arch = x86_64
@@ -16,7 +16,7 @@ pkgbase = wayscriber
1616
depends = wl-clipboard
1717
depends = grim
1818
depends = slurp
19-
source = git+https://github.com/devmobasa/wayscriber.git#tag=v0.9.12
19+
source = git+https://github.com/devmobasa/wayscriber.git#tag=v0.9.13
2020
source = wayscriber.desktop
2121
source = wayscriber-configurator.desktop
2222
source = icons/wayscriber-16.png

packaging/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Maintainer: wayscriber maintainers <hyprarcher@proton.me>
22
pkgname=wayscriber
3-
pkgver=0.9.12
3+
pkgver=0.9.13
44
pkgrel=1
55
pkgdesc='Screen annotation tool for Wayland compositors'
66
arch=('x86_64' 'aarch64')

tools/update-aur-from-manifest.sh

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,35 @@ if [[ -z "$VERSION" ]]; then
6868
VERSION="$(jq -r '.version' "$MANIFEST")"
6969
fi
7070

71+
read_pkgver_from_pkgbuild() {
72+
awk -F= '/^pkgver=/{print $2; exit}' "$1"
73+
}
74+
75+
read_pkgrel_from_pkgbuild() {
76+
local value
77+
value="$(awk -F= '/^pkgrel=/{print $2; exit}' "$1")"
78+
if [[ -z "$value" || ! "$value" =~ ^[0-9]+$ ]]; then
79+
echo 0
80+
else
81+
echo "$value"
82+
fi
83+
}
84+
85+
next_pkgrel() {
86+
local dir="$1"
87+
local pkgfile="$dir/PKGBUILD"
88+
local current_pkgver current_pkgrel
89+
90+
current_pkgver="$(read_pkgver_from_pkgbuild "$pkgfile")"
91+
current_pkgrel="$(read_pkgrel_from_pkgbuild "$pkgfile")"
92+
93+
if [[ "$current_pkgver" == "$VERSION" ]]; then
94+
echo $((current_pkgrel + 1))
95+
else
96+
echo 1
97+
fi
98+
}
99+
71100
sha_for() {
72101
local name="$1"
73102
jq -r --arg n "$name" '.artifacts[] | select(.name==$n) | .sha256' "$MANIFEST"
@@ -88,19 +117,21 @@ PY
88117

89118
update_bin() {
90119
local dir="$1"
120+
local pkgrel
91121
[[ -d "$dir" ]] || { echo "Skip bin: $dir not found" >&2; return; }
92122
local sha
93123
sha="$(sha_for "wayscriber-v${VERSION}-linux-x86_64.tar.gz")"
94124
[[ -n "$sha" && "$sha" != "null" ]] || { echo "Bin checksum missing in manifest" >&2; exit 1; }
125+
pkgrel="$(next_pkgrel "$dir")"
95126

96127
pushd "$dir" >/dev/null
97128
replace_line PKGBUILD '^pkgver=.*' "pkgver=${VERSION}"
98-
replace_line PKGBUILD '^pkgrel=.*' "pkgrel=1"
129+
replace_line PKGBUILD '^pkgrel=.*' "pkgrel=${pkgrel}"
99130
replace_line PKGBUILD '^source_x86_64=.*' "source_x86_64=(\"wayscriber-v${VERSION}-linux-x86_64.tar.gz::https://github.com/devmobasa/wayscriber/releases/download/v${VERSION}/wayscriber-v${VERSION}-linux-x86_64.tar.gz\")"
100131
replace_line PKGBUILD '^sha256sums_x86_64=.*' "sha256sums_x86_64=('${sha}')"
101132

102133
replace_line .SRCINFO '^\s*pkgver = .*' "pkgver = ${VERSION}"
103-
replace_line .SRCINFO '^\s*pkgrel = .*' "pkgrel = 1"
134+
replace_line .SRCINFO '^\s*pkgrel = .*' "pkgrel = ${pkgrel}"
104135
replace_line .SRCINFO '^\s*source_x86_64 = .*' "source_x86_64 = wayscriber-v${VERSION}-linux-x86_64.tar.gz::https://github.com/devmobasa/wayscriber/releases/download/v${VERSION}/wayscriber-v${VERSION}-linux-x86_64.tar.gz"
105136
replace_line .SRCINFO '^\s*sha256sums_x86_64 = .*' "sha256sums_x86_64 = ${sha}"
106137

@@ -115,13 +146,15 @@ update_bin() {
115146

116147
update_source() {
117148
local dir="$1"
149+
local pkgrel
118150
[[ -d "$dir" ]] || { echo "Skip source: $dir not found" >&2; return; }
119151
pushd "$dir" >/dev/null
120152
replace_line PKGBUILD '^pkgver=.*' "pkgver=${VERSION}"
121-
replace_line PKGBUILD '^pkgrel=.*' "pkgrel=1"
153+
pkgrel="$(next_pkgrel "$dir")"
154+
replace_line PKGBUILD '^pkgrel=.*' "pkgrel=${pkgrel}"
122155

123156
replace_line .SRCINFO '^\s*pkgver = .*' "pkgver = ${VERSION}"
124-
replace_line .SRCINFO '^\s*pkgrel = .*' "pkgrel = 1"
157+
replace_line .SRCINFO '^\s*pkgrel = .*' "pkgrel = ${pkgrel}"
125158

126159
git status --short
127160
if [[ "$DO_PUSH" -eq 1 && -n "$(git status --porcelain)" ]]; then
@@ -134,15 +167,17 @@ update_source() {
134167

135168
update_configurator() {
136169
local dir="$1"
170+
local pkgrel
137171
[[ -d "$dir" ]] || { echo "Skip configurator: $dir not found" >&2; return; }
138172
pushd "$dir" >/dev/null
139173
replace_line PKGBUILD '^pkgver=.*' "pkgver=${VERSION}"
140-
replace_line PKGBUILD '^pkgrel=.*' "pkgrel=1"
174+
pkgrel="$(next_pkgrel "$dir")"
175+
replace_line PKGBUILD '^pkgrel=.*' "pkgrel=${pkgrel}"
141176
replace_line PKGBUILD '^source=.*' "source=(\"git+https://github.com/devmobasa/wayscriber.git#tag=v${VERSION}\")"
142177
replace_line PKGBUILD '^sha256sums=.*' "sha256sums=('SKIP')"
143178

144179
replace_line .SRCINFO '^\s*pkgver = .*' "pkgver = ${VERSION}"
145-
replace_line .SRCINFO '^\s*pkgrel = .*' "pkgrel = 1"
180+
replace_line .SRCINFO '^\s*pkgrel = .*' "pkgrel = ${pkgrel}"
146181
replace_line .SRCINFO '^\s*source = .*' "source = git+https://github.com/devmobasa/wayscriber.git#tag=v${VERSION}"
147182
replace_line .SRCINFO '^\s*sha256sums = .*' "sha256sums = SKIP"
148183

0 commit comments

Comments
 (0)