Skip to content

Commit

Permalink
Validate .desktop file
Browse files Browse the repository at this point in the history
  • Loading branch information
amezin committed Dec 24, 2023
1 parent d1d2aef commit de39d47
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
shell: bash
if: ${{ always() && steps.checkout.conclusion == 'success' }}

- name: Validate .desktop file
run: make desktop-file-validate 2>&1 | tee desktop-file.log
if: ${{ always() && steps.checkout.conclusion == 'success' }}

- name: Validate Gtk .ui files
run: xvfb-run make gtk-builder-validate 2>&1 | tee gtk-builder.log
shell: bash
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,17 @@ $(CONFIGURED_DBUS_SERVICE): $(UNCONFIGURED_DBUS_SERVICE)

CLEAN += $(CONFIGURED_DESKTOP_ENTRY) $(CONFIGURED_DBUS_SERVICE)

DESKTOP_FILE_VALIDATE_TOOL := $(call find-tool,desktop-file-validate)

desktop-file-validate: $(DESKTOP_FILE_VALIDATE_TOOL) $(CONFIGURED_DESKTOP_ENTRY)
$^

.PHONY: desktop-file-validate

ifneq (tool-not-found/desktop-file-validate,$(DESKTOP_FILE_VALIDATE_TOOL))
all: desktop-file-validate
endif

$(addprefix $(DESTDIR),$(SYS_INSTALLED_DESKTOP_ENTRY) $(SYS_INSTALLED_DBUS_SERVICE)): | installdirs
$(INSTALL_DATA) $< $@

Expand Down
2 changes: 2 additions & 0 deletions ddterm/com.github.amezin.ddterm.desktop.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ X-ExecArg=--

[Desktop Action toggle]
Name=Toggle
Exec=gapplication action com.github.amezin.ddterm toggle

[Desktop Action preferences]
Name=Preferences…
Exec=gapplication action com.github.amezin.ddterm preferences

0 comments on commit de39d47

Please sign in to comment.