Skip to content

Commit

Permalink
Inject git version for devel builds
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Dec 28, 2024
1 parent b77c6db commit d1550f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BLUEPRINTS = $(wildcard ui/*.blp)
UIDEFS = $(addsuffix .ui,$(basename $(BLUEPRINTS)))
CATALOGS = $(wildcard po/*.po)
LOCALEDIR = /app/share/locale/
GIT_DESCRIBE = $(shell git describe | tail -c+2)

XGETTEXT_OPTS = \
--package-name=$(APPID) \
Expand Down Expand Up @@ -71,6 +72,8 @@ flatpak-lint-repo:

.PHONY:
devel:
sed -i 's/^version = .*/version = "$(GIT_DESCRIBE)"/' Cargo.toml
cargo update -p turnon
sed -i '/de.swsnr.turnon.Devel/! s/de\.swsnr\.turnon/de.swsnr.turnon.Devel/g' \
src/config.rs \
resources/de.swsnr.turnon.metainfo.xml.in de.swsnr.turnon.desktop.in \
Expand Down
5 changes: 1 addition & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ impl TurnOnApplication {
"/de/swsnr/turnon/de.swsnr.turnon.metainfo.xml",
Some(crate::config::VERSION),
);

if crate::config::is_development() {
dialog.set_version("devel");
}
dialog.set_version(crate::config::VERSION);

glib::spawn_future_local(glib::clone!(
#[strong(rename_to = devices)]
Expand Down

0 comments on commit d1550f6

Please sign in to comment.