feat: add make patch, minor and major, and show the running version
The version had never moved from 0.1.0, so a build on the Deck could not be matched to what it contains. The bump targets follow frig and worklane: write the new version, amend it into the last commit and tag it. Here they also add a release to the Flatpak metainfo, and refuse a version that CHANGELOG.md, new in this commit, has no entry for. The version is shown at the bottom left of every screen, the login screen included.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# Changelog
|
||||
|
||||
One section per version, newest first.
|
||||
|
||||
## v0.2.0 (2026-11-04)
|
||||
|
||||
### Features
|
||||
|
||||
- Remus has a logo: an R on a Roman column between sound bars. The app icon and the Steam library artwork are built from it.
|
||||
- The interface takes the logo's colours and type: warm maroon backgrounds, cream text and serif headings.
|
||||
- Settings in the sidebar has an option to colour the interface from the cover of the playing track, fading to the next cover when the track changes. It is off by default.
|
||||
- The running version is shown at the bottom left of every screen.
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- Logging in works on servers that refuse token logins, such as Nextcloud Music. remus falls back to the password, and a wrong password on Nextcloud points at the Music app's API password.
|
||||
|
||||
## v0.1.0 (2026-11-04)
|
||||
|
||||
### Features
|
||||
|
||||
- A fullscreen music player for a Subsonic or OpenSubsonic library, driven with a controller and built for SteamOS.
|
||||
- Browse recently added and random albums, all albums, artists and playlists, search the library, and queue albums, playlists and tracks.
|
||||
- Plays through GStreamer and scrobbles to the server.
|
||||
- Packaged as a Flatpak for SteamOS.
|
||||
Generated
+1
-1
@@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
||||
|
||||
[[package]]
|
||||
name = "remus"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"directories",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "remus"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
|
||||
@@ -108,6 +108,78 @@ branding: ## Regenerate the logo SVGs and render the PNGs (needs inkscape)
|
||||
render steam-logo 1280 720 steam-logo-1280x720; \
|
||||
render steam-icon 256 256 steam-icon-256
|
||||
|
||||
# Versioning. Cargo.toml's [package] version is the one source: the app shows
|
||||
# it, and the bump writes it to Cargo.lock and the Flatpak metainfo too.
|
||||
PACKAGE = $(shell awk -F'"' '/^\[package\]/{p=1;next} /^\[/{p=0} p && /^name *= *"/{print $$2; exit}' Cargo.toml)
|
||||
CURRENT = $(shell awk -F'"' '/^\[package\]/{p=1;next} /^\[/{p=0} p && /^version *= *"/{print $$2; exit}' Cargo.toml)
|
||||
METAINFO = flatpak/$(FLATPAK_ID).metainfo.xml
|
||||
|
||||
.PHONY: version
|
||||
version: ## Print the current version
|
||||
@echo $(CURRENT)
|
||||
|
||||
patch: BUMP = patch
|
||||
minor: BUMP = minor
|
||||
major: BUMP = major
|
||||
|
||||
.PHONY: patch minor major
|
||||
patch: bump ## Bump for a bug fix: amend into the last commit and tag it
|
||||
minor: bump ## Bump for a feature: amend into the last commit and tag it
|
||||
major: bump ## Bump for a breaking change, decided by hand
|
||||
|
||||
# Folds the bump into the last commit and tags it, as one action, so there is
|
||||
# never a bump without a tag or a tag without a bump. Refuses anything that
|
||||
# would make rewriting that commit lose work, orphan a tag or need a force push,
|
||||
# and a version CHANGELOG.md does not describe yet.
|
||||
.PHONY: bump
|
||||
bump:
|
||||
@set -e; \
|
||||
if [ -z "$(BUMP)" ]; then echo "error: run make patch, make minor or make major" >&2; exit 1; fi; \
|
||||
if ! git rev-parse -q --verify HEAD >/dev/null 2>&1; then \
|
||||
echo "error: no commits yet, so there is no commit to fold a version bump into. Commit first." >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -n "$$(git status --porcelain)" ]; then \
|
||||
echo "error: working tree is dirty. Commit or stash first, and decide whether that work belongs in this version:" >&2; \
|
||||
git status --short >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -n "$$(git tag --points-at HEAD)" ]; then \
|
||||
echo "error: HEAD is already tagged $$(git tag --points-at HEAD | paste -sd' '). Amending it would leave that tag on an orphaned commit. Commit something first." >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if upstream=$$(git rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>/dev/null) && \
|
||||
git merge-base --is-ancestor HEAD "$$upstream" 2>/dev/null; then \
|
||||
echo "error: HEAD is already pushed to $$upstream. Amending it would need a force push. Commit something first." >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
current="$(CURRENT)"; \
|
||||
if [ -z "$$current" ]; then echo "error: no version found in the [package] table of Cargo.toml" >&2; exit 1; fi; \
|
||||
new=$$(echo "$$current" | awk -F. -v kind=$(BUMP) '{ \
|
||||
if (NF != 3) exit 1; \
|
||||
if (kind == "patch") printf "%d.%d.%d\n", $$1, $$2, $$3 + 1; \
|
||||
else if (kind == "minor") printf "%d.%d.0\n", $$1, $$2 + 1; \
|
||||
else printf "%d.0.0\n", $$1 + 1 }'); \
|
||||
if [ -z "$$new" ]; then echo "error: cannot bump version '$$current': expected major.minor.patch" >&2; exit 1; fi; \
|
||||
if git rev-parse -q --verify "refs/tags/v$$new" >/dev/null; then \
|
||||
echo "error: tag v$$new already exists" >&2; exit 1; \
|
||||
fi; \
|
||||
if ! grep -q "^## v$$new " CHANGELOG.md 2>/dev/null; then \
|
||||
echo "error: CHANGELOG.md has no '## v$$new' entry. Add one to the last commit first (git commit --amend)." >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
today=$$(date +%Y-%m-%d); \
|
||||
awk -v v="$$new" '/^\[package\]/{p=1} /^\[/ && !/^\[package\]/{p=0} p && /^version *= *"/{sub(/"[^"]*"/, "\"" v "\"")} {print}' Cargo.toml > Cargo.toml.bump; \
|
||||
mv Cargo.toml.bump Cargo.toml; \
|
||||
awk -v v="$$new" -v pkg="$(PACKAGE)" '$$0 == "name = \"" pkg "\""{f=1} f && /^version = "/{sub(/"[^"]*"/, "\"" v "\""); f=0} {print}' Cargo.lock > Cargo.lock.bump; \
|
||||
mv Cargo.lock.bump Cargo.lock; \
|
||||
awk -v v="$$new" -v d="$$today" '{print} /^ *<releases>/{print " <release version=\"" v "\" date=\"" d "\"/>"}' $(METAINFO) > $(METAINFO).bump; \
|
||||
mv $(METAINFO).bump $(METAINFO); \
|
||||
git add Cargo.toml Cargo.lock $(METAINFO); \
|
||||
git commit --quiet --amend --no-edit; \
|
||||
git tag -a "v$$new" -m "v$$new"; \
|
||||
echo "$$current -> $$new, tagged v$$new on $$(git rev-parse --short HEAD) ($$(git log -1 --format=%s))"
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## Remove build output, screenshots and scratch config
|
||||
cargo clean
|
||||
|
||||
@@ -83,3 +83,11 @@ REMUS_DEV_SCRIPT="wait:3000,shot:home.png,right,activate,wait:2000,shot:album.pn
|
||||
```
|
||||
|
||||
A scripted run starts fullscreen like a normal one, so it also checks that startup reaches fullscreen. Add `--windowed` to capture a window instead. Steps: `size:WxH`, `size:full`, `wait:MS`, `shot:PATH`, and action names (`up`, `down`, `left`, `right`, `activate`, `back`, `queue`, `next`, `play-pause`, `section-next`, `now-playing`, `search`, `quit`). Point `XDG_CONFIG_HOME` and `XDG_CACHE_HOME` at a scratch directory to keep test runs away from your own config.
|
||||
|
||||
### Versions
|
||||
|
||||
Every finished ticket bumps the version, so a build on the Deck can be matched to what it contains. The running version is shown at the bottom left of every screen.
|
||||
|
||||
- `make patch` for a bug fix, `make minor` for a feature, `make major` only when a breaking change has been decided.
|
||||
- Before bumping, add a `## v<new> (<date>)` entry at the top of `CHANGELOG.md`, with `### Features` and `### Bug fixes` subsections (leave out an empty one), and commit it with the change. `make version` prints the current version.
|
||||
- The bump writes the new version to `Cargo.toml`, `Cargo.lock` and the Flatpak metainfo, amends that into the last commit and tags it `v<new>`. It refuses a dirty tree, a commit that is already tagged or pushed, and a version the changelog has no entry for.
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
</supports>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="0.2.0" date="2026-11-04"/>
|
||||
<release version="0.1.0" date="2026-11-04"/>
|
||||
</releases>
|
||||
</component>
|
||||
|
||||
@@ -22,6 +22,7 @@ fn main() -> anyhow::Result<()> {
|
||||
.build()?;
|
||||
|
||||
let ui = AppWindow::new()?;
|
||||
ui.set_version(env!("CARGO_PKG_VERSION").into());
|
||||
app::install(&ui, rt.handle().clone());
|
||||
input::spawn_gamepad(|action| {
|
||||
let _ = slint::invoke_from_event_loop(move || app::with_app(move |app| app.action(action)));
|
||||
|
||||
@@ -554,6 +554,7 @@ component NowBar inherits Rectangle {
|
||||
|
||||
component HintBar inherits Rectangle {
|
||||
in property <[Hint]> hints;
|
||||
in property <string> version;
|
||||
|
||||
pure function key-color(k: string) -> color {
|
||||
if (k == "A") { return #3fb950; }
|
||||
@@ -600,6 +601,16 @@ component HintBar inherits Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Which build is running, so a report from the Deck can be matched to it.
|
||||
Text {
|
||||
x: 28px * Theme.s;
|
||||
height: parent.height;
|
||||
text: "remus " + root.version;
|
||||
font-size: 12px * Theme.s;
|
||||
color: Theme.faint;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
|
||||
component Field inherits VerticalLayout {
|
||||
@@ -933,6 +944,7 @@ export component AppWindow inherits Window {
|
||||
|
||||
in property <[Hint]> hints;
|
||||
in property <string> toast;
|
||||
in property <string> version;
|
||||
|
||||
public function focus-main() {
|
||||
fs.focus();
|
||||
@@ -1128,6 +1140,7 @@ export component AppWindow inherits Window {
|
||||
HintBar {
|
||||
height: 46px * Theme.s;
|
||||
hints: root.hints;
|
||||
version: root.version;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user