Skip to content

Commit

Permalink
Merge branch 'Antiz96:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Delor3an91 authored Jan 21, 2025
2 parents f894cee + 2646056 commit fcc47f5
Show file tree
Hide file tree
Showing 24 changed files with 904 additions and 1,096 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ jobs:
- name: Run pylint
run: find . -name '*.py' -exec pylint -d E0611,E0401,C0103,C0301 --output-format=colorized {} +

- name: Run make clean
run: make clean

- name: Run make
run: make

- name: Run make test
run: make test
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file.

## [v3.6.0](https://github.com/Antiz96/arch-update/releases/tag/v3.6.0) - 2025-01-21

### Features

- Add the `NoNotification` option to `arch-update.conf` ([#302](https://github.com/Antiz96/arch-update/pull/302)) - ([39b0efc](https://github.com/Antiz96/arch-update/commit/39b0efc5dfb3aa3eea9f77104d27f00e384446ec)) by @Antiz96

### Documentation

- General rework & simplification of the documentation ([#301](https://github.com/Antiz96/arch-update/pull/301)) - ([c6ed5d8](https://github.com/Antiz96/arch-update/commit/c6ed5d8f334fd7488e409fb61d3b9cb0414836e5)) by @Antiz96
- Document the usage of `xdg-terminal-exec` to run Arch-Update in a specific terminal emulator ([#300](https://github.com/Antiz96/arch-update/pull/300)) - ([f568955](https://github.com/Antiz96/arch-update/commit/f5689558be3c44a7c39ac4434e7635c623a3ab7f)) by @Antiz96
- Use `scdoc` to write and generate man pages ([#299](https://github.com/Antiz96/arch-update/pull/299)) - ([6749a94](https://github.com/Antiz96/arch-update/commit/6749a9400819330dbc11819c7d6bfad059cace8d)) by @Antiz96

### Miscellaneous

- Use more specific names for 'notif' and 'flatpak' variables ([#303](https://github.com/Antiz96/arch-update/pull/303)) - ([d021523](https://github.com/Antiz96/arch-update/commit/d021523844d100a06a1f7d0b67163cb526ebd3ca)) by @Antiz96

## [v3.5.0](https://github.com/Antiz96/arch-update/releases/tag/v3.5.0) - 2025-01-18

### Features
Expand Down
62 changes: 38 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,28 @@ _pkgname=Arch-Update

PREFIX ?= /usr/local

.PHONY: all install test uninstall
.PHONY: build test install clean uninstall

all:
build:
# Generate man pages
scdoc < "doc/man/${pkgname}.1.scd" > "doc/man/${pkgname}.1"
scdoc < "doc/man/${pkgname}.conf.5.scd" > "doc/man/${pkgname}.conf.5"
scdoc < "doc/man/fr/${pkgname}.1.scd" > "doc/man/fr/${pkgname}.1"
scdoc < "doc/man/fr/${pkgname}.conf.5.scd" > "doc/man/fr/${pkgname}.conf.5"

# Archive man pages
gzip -c "doc/man/${pkgname}.1" > "doc/man/${pkgname}.1.gz"
gzip -c "doc/man/${pkgname}.conf.5" > "doc/man/${pkgname}.conf.5.gz"
gzip -c "doc/man/fr/${pkgname}.1" > "doc/man/fr/${pkgname}.1.gz"
gzip -c "doc/man/fr/${pkgname}.conf.5" > "doc/man/fr/${pkgname}.conf.5.gz"

# Generate translations files
msgfmt po/fr.po -o po/fr.mo
msgfmt po/sv.po -o po/sv.mo

test:
# Run some simple unit tests on basic functions
bats test/case/basic_functions.bats

install:
# Install main script
Expand All @@ -27,33 +46,21 @@ install:
install -Dm 644 "res/systemd/${pkgname}.timer" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.timer"
install -Dm 644 "res/systemd/${pkgname}-tray.service" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}-tray.service"

# Generate and install .mo files for translations
# .mo files are installed as "Arch-Update.mo" to avoid conflicting with the "arch-update.mo" files shipped by the arch-update Gnome extension (https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/)
msgfmt po/fr.po -o po/fr.mo
msgfmt po/sv.po -o po/sv.mo
install -Dm 644 po/fr.mo "${DESTDIR}${PREFIX}/share/locale/fr/LC_MESSAGES/${_pkgname}.mo"
install -Dm 644 po/sv.mo "${DESTDIR}${PREFIX}/share/locale/sv/LC_MESSAGES/${_pkgname}.mo"
rm -f po/fr.mo
rm -f po/sv.mo

# Install shell completions
install -Dm 644 "res/completions/${pkgname}.bash" "${DESTDIR}${PREFIX}/share/bash-completion/completions/${pkgname}"
install -Dm 644 "res/completions/${pkgname}.zsh" "${DESTDIR}${PREFIX}/share/zsh/site-functions/_${pkgname}"
install -Dm 644 "res/completions/${pkgname}.fish" "${DESTDIR}${PREFIX}/share/fish/vendor_completions.d/${pkgname}.fish"

# Archive and install man pages
gzip -c "doc/man/${pkgname}.1" > "doc/man/${pkgname}.1.gz"
gzip -c "doc/man/${pkgname}.conf.5" > "doc/man/${pkgname}.conf.5.gz"
gzip -c "doc/man/fr/${pkgname}.1" > "doc/man/fr/${pkgname}.1.gz"
gzip -c "doc/man/fr/${pkgname}.conf.5" > "doc/man/fr/${pkgname}.conf.5.gz"
# Install man pages
install -Dm 644 "doc/man/${pkgname}.1.gz" "${DESTDIR}${PREFIX}/share/man/man1/${pkgname}.1.gz"
install -Dm 644 "doc/man/${pkgname}.conf.5.gz" "${DESTDIR}${PREFIX}/share/man/man5/${pkgname}.conf.5.gz"
install -Dm 644 "doc/man/fr/${pkgname}.1.gz" "${DESTDIR}${PREFIX}/share/man/fr/man1/${pkgname}.1.gz"
install -Dm 644 "doc/man/fr/${pkgname}.conf.5.gz" "${DESTDIR}${PREFIX}/share/man/fr/man5/${pkgname}.conf.5.gz"
rm -f "doc/man/${pkgname}.1.gz"
rm -f "doc/man/${pkgname}.conf.5.gz"
rm -f "doc/man/fr/${pkgname}.1.gz"
rm -f "doc/man/fr/${pkgname}.conf.5.gz"

# Install translations files
# Translations files are installed as "Arch-Update.mo" to avoid conflicting with the "arch-update.mo" files shipped by the arch-update Gnome extension (https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/)
install -Dm 644 po/fr.mo "${DESTDIR}${PREFIX}/share/locale/fr/LC_MESSAGES/${_pkgname}.mo"
install -Dm 644 po/sv.mo "${DESTDIR}${PREFIX}/share/locale/sv/LC_MESSAGES/${_pkgname}.mo"

# Install documentation
install -Dm 644 README.md "${DESTDIR}${PREFIX}/share/doc/${pkgname}/README.md"
Expand All @@ -62,6 +69,17 @@ install:
# Install example config
install -Dm 644 "res/config/${pkgname}.conf.example" "${DESTDIR}${PREFIX}/share/${pkgname}/config/${pkgname}.conf.example"

clean:
# Delete generated and archived man pages
rm -f "doc/man/${pkgname}.1"{,.gz}
rm -f "doc/man/${pkgname}.conf.5"{,.gz}
rm -f "doc/man/fr/${pkgname}.1"{,.gz}
rm -f "doc/man/fr/${pkgname}.conf.5"{,.gz}

# Delete generated translations files
rm -f po/fr.mo
rm -f po/sv.mo

uninstall:
# Delete main script
rm -f "${DESTDIR}${PREFIX}/bin/${pkgname}"
Expand Down Expand Up @@ -98,7 +116,3 @@ uninstall:

# Delete documentation folder
rm -rf "${DESTDIR}${PREFIX}/share/doc/${pkgname}/"

test:
# Run some simple unit tests on basic functions
bats test/case/basic_functions.bats
Loading

0 comments on commit fcc47f5

Please sign in to comment.