Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ jobs:
echo "Cargo.toml version ($VERSION) does not match tag (${{ github.ref_name }})" >&2
exit 1
fi
- name: Check that the metainfo has a release entry for this version
shell: bash
run: |
metainfo=resources/com.andr2i.scrolex.metainfo.xml
if ! grep -q "<release version=\"$VERSION\"" "$metainfo"; then
echo "$metainfo has no <release version=\"$VERSION\"> entry" >&2
exit 1
fi
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "scrolex"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
authors = ["Andrii Berezhynskyi <microsolutions_harebrain@aleeas.com>"]
license = "AGPL-3.0-or-later"
Expand Down Expand Up @@ -35,6 +35,10 @@ debug = false
[package.metadata.deb]
assets = [
["target/release/scrolex", "usr/bin/", "755"],
["resources/scrolex.desktop", "usr/share/applications/", "644"],
["resources/icon.png", "usr/share/icons/hicolor/64x64/apps/scrolex.png", "644"]
["resources/com.andr2i.scrolex.desktop", "usr/share/applications/", "644"],
["resources/icon-64.png", "usr/share/icons/hicolor/64x64/apps/com.andr2i.scrolex.png", "644"],
["resources/icon-128.png", "usr/share/icons/hicolor/128x128/apps/com.andr2i.scrolex.png", "644"],
["resources/icon-256.png", "usr/share/icons/hicolor/256x256/apps/com.andr2i.scrolex.png", "644"],
["resources/icon-512.png", "usr/share/icons/hicolor/512x512/apps/com.andr2i.scrolex.png", "644"],
["resources/com.andr2i.scrolex.metainfo.xml", "usr/share/metainfo/", "644"]
]
68 changes: 68 additions & 0 deletions ci/bump-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/sh
set -eu

usage() {
cat >&2 <<'EOF'
usage: ci/bump-version <version> [date]

version MAJOR.MINOR.PATCH, optionally with a pre-release suffix (0.8.0-rc1)
date release date for the metainfo entry, YYYY-MM-DD (default: today)
EOF
exit 2
}

[ $# -ge 1 ] && [ $# -le 2 ] || usage
version=$1
date=${2:-$(date +%F)}

if ! printf '%s' "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$'; then
echo "bump-version: '$version' is not a valid version" >&2
exit 1
fi
if [ "$(date -d "$date" +%F 2>/dev/null)" != "$date" ]; then
echo "bump-version: '$date' is not a valid YYYY-MM-DD date" >&2
exit 1
fi

root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$root"

metainfo=resources/com.andr2i.scrolex.metainfo.xml
for f in Cargo.toml Cargo.lock "$metainfo"; do
[ -f "$f" ] || { echo "bump-version: $f not found" >&2; exit 1; }
done

previous=$(sed -n 's/^version *= *"\(.*\)"/\1/p' Cargo.toml | head -1)
repository=$(sed -n 's/^repository *= *"\(.*\)"/\1/p' Cargo.toml | head -1)
[ -n "$repository" ] || { echo "bump-version: no repository in Cargo.toml" >&2; exit 1; }

awk -v v="$version" '
/^\[/ { in_package = ($0 == "[package]") }
in_package && /^version *=/ && !seen { print "version = \"" v "\""; seen = 1; next }
{ print }
' Cargo.toml > Cargo.toml.bump && mv Cargo.toml.bump Cargo.toml

awk -v v="$version" '
after_name && /^version *=/ { print "version = \"" v "\""; after_name = 0; next }
{ after_name = ($0 == "name = \"scrolex\""); print }
' Cargo.lock > Cargo.lock.bump && mv Cargo.lock.bump Cargo.lock

if grep -q "<release version=\"$version\"" "$metainfo"; then
metainfo_note="already listed $version, left alone"
else
awk -v v="$version" -v d="$date" -v url="$repository" '
{ print }
/<releases>/ && !seen {
printf " <release version=\"%s\" date=\"%s\">\n", v, d
printf " <url>%s/releases/tag/%s</url>\n", url, v
print " </release>"
seen = 1
}
' "$metainfo" > "$metainfo.bump" && mv "$metainfo.bump" "$metainfo"
metainfo_note="added $version dated $date"
fi

echo "$previous -> $version"
echo " Cargo.toml"
echo " Cargo.lock"
echo " $metainfo ($metainfo_note)"
9 changes: 5 additions & 4 deletions packaging/flatpak/com.andr2i.scrolex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ modules:
build-commands:
- cargo build --release
- install -Dm755 target/release/scrolex /app/bin/scrolex
- install -Dm644 resources/icon.png /app/share/icons/hicolor/64x64/apps/com.andr2i.scrolex.png
- install -Dm644 resources/scrolex.desktop /app/share/applications/com.andr2i.scrolex.desktop
- desktop-file-edit --set-icon=com.andr2i.scrolex /app/share/applications/com.andr2i.scrolex.desktop
- sed -i -e "s/@VERSION@/$(sed -nE 's/^version *= *\"(.*)\"/\1/p; /^version/q' Cargo.toml)/" -e "s/@DATE@/$(date +%F)/" resources/com.andr2i.scrolex.metainfo.xml
- install -Dm644 resources/icon-64.png /app/share/icons/hicolor/64x64/apps/com.andr2i.scrolex.png
- install -Dm644 resources/icon-128.png /app/share/icons/hicolor/128x128/apps/com.andr2i.scrolex.png
- install -Dm644 resources/icon-256.png /app/share/icons/hicolor/256x256/apps/com.andr2i.scrolex.png
- install -Dm644 resources/icon-512.png /app/share/icons/hicolor/512x512/apps/com.andr2i.scrolex.png
- install -Dm644 resources/com.andr2i.scrolex.desktop /app/share/applications/com.andr2i.scrolex.desktop
- install -Dm644 resources/com.andr2i.scrolex.metainfo.xml /app/share/metainfo/com.andr2i.scrolex.metainfo.xml
sources:
- type: git
Expand Down
11 changes: 11 additions & 0 deletions resources/com.andr2i.scrolex.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Scrolex
Comment=A Horizontally Scrolled PDF Viewer
Exec=scrolex %f
Icon=com.andr2i.scrolex
Terminal=false
StartupWMClass=scrolex
MimeType=application/pdf;application/epub+zip;application/x-mobipocket-ebook;application/x-fictionbook+xml;application/oxps;application/vnd.ms-xpsdocument;application/vnd.comicbook+zip;
Categories=Graphics;Viewer;
19 changes: 18 additions & 1 deletion resources/com.andr2i.scrolex.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@
</developer>
<content_rating type="oars-1.1"/>
<releases>
<release version="@VERSION@" date="@DATE@"/>
<release version="0.7.2" date="2026-07-27">
<url>https://github.com/molecule-man/scrolex/releases/tag/0.7.2</url>
</release>
<release version="0.7.1" date="2026-07-25">
<url>https://github.com/molecule-man/scrolex/releases/tag/0.7.1</url>
</release>
<release version="0.7.0" date="2026-07-24">
<url>https://github.com/molecule-man/scrolex/releases/tag/0.7.0</url>
</release>
<release version="0.6.0" date="2026-07-22">
<url>https://github.com/molecule-man/scrolex/releases/tag/0.6.0</url>
</release>
<release version="0.5.1" date="2026-07-10">
<url>https://github.com/molecule-man/scrolex/releases/tag/0.5.1</url>
</release>
<release version="0.5.0" date="2026-07-09">
<url>https://github.com/molecule-man/scrolex/releases/tag/0.5.0</url>
</release>
</releases>
</component>
Binary file added resources/icon-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed resources/icon.png
Binary file not shown.
10 changes: 0 additions & 10 deletions resources/scrolex.desktop

This file was deleted.

Loading