mirror of
https://github.com/gwebu-team/profile.d.git
synced 2025-12-11 12:15:47 +00:00
Format the code, add fmt and check targets
Some checks failed
Makefile CI / build (push) Has been cancelled
Some checks failed
Makefile CI / build (push) Has been cancelled
This commit is contained in:
parent
82d22c0bf0
commit
60e62585eb
8 changed files with 188 additions and 162 deletions
17
Makefile
17
Makefile
|
|
@ -1,8 +1,8 @@
|
|||
SHELL:=/bin/bash # Use bash syntax, mitigates dash's printf on Debian
|
||||
ver:=$(shell git describe --dirty --long --match='v[0-9]*.[0-9]*' | cut -c 2- | cut -d - -f 1,2,4)
|
||||
rpm_ver:=$(firstword $(subst -, ,$(ver)))
|
||||
rpm_rev:=$(subst $(rpm_ver)-,,$(ver))
|
||||
rpm_rev:=$(subst -,_,$(rpm_rev))
|
||||
name_rev:=$(subst $(rpm_ver)-,,$(ver))
|
||||
rpm_rev:=$(subst -,_,$(name_rev))
|
||||
|
||||
|
||||
help:
|
||||
|
|
@ -15,6 +15,8 @@ help:
|
|||
@echo " rpm: Create an RPM package."
|
||||
@echo " podman_rpm Create an RPM package using podman on MacOS."
|
||||
@echo " changelog: Add a changelog entry to gwebu-profile.spec.in."
|
||||
@echo " check: Run shellcheck on all shell scripts."
|
||||
@echo " fmt: Format all shell scripts with shfmt."
|
||||
@echo
|
||||
@echo " clean: Clean all generated files."
|
||||
@echo
|
||||
|
|
@ -45,6 +47,17 @@ changelog:
|
|||
./changelog.sh
|
||||
|
||||
|
||||
.PHONY: check
|
||||
check:
|
||||
shellcheck --shell=bash --external-sources --source-path=etc/profile.d *.sh etc/profile.d/*.sh
|
||||
rpmlint *.spec.in
|
||||
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
shfmt -w -i 4 -ci *.sh etc/profile.d/*.sh
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf dist
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue