mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 18:09:28 +00:00
contrib/commitinfo: support updating the commit info
This commit is contained in:
parent
576f41fc86
commit
6e57826bbe
2 changed files with 10 additions and 1 deletions
5
Makefile
5
Makefile
|
|
@ -12,7 +12,7 @@ DATE ?= $(shell date --rfc-email)
|
||||||
VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null)
|
VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null)
|
||||||
export DATE VERSION
|
export DATE VERSION
|
||||||
|
|
||||||
.PHONY: all checksums docs rsc clean
|
.PHONY: all checksums commitinfo docs rsc clean
|
||||||
|
|
||||||
all: checksums docs rsc
|
all: checksums docs rsc
|
||||||
|
|
||||||
|
|
@ -21,6 +21,9 @@ checksums: checksums.json
|
||||||
checksums.json: contrib/checksums.sh $(ALL_RSC)
|
checksums.json: contrib/checksums.sh $(ALL_RSC)
|
||||||
contrib/checksums.sh > $@
|
contrib/checksums.sh > $@
|
||||||
|
|
||||||
|
commitinfo:
|
||||||
|
contrib/commitinfo.sh
|
||||||
|
|
||||||
docs: $(HTML)
|
docs: $(HTML)
|
||||||
|
|
||||||
%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html
|
%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html
|
||||||
|
|
|
||||||
6
contrib/commitinfo.sh
Executable file
6
contrib/commitinfo.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
sed -i \
|
||||||
|
-e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \
|
||||||
|
-e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \
|
||||||
|
global-functions.rsc
|
||||||
Loading…
Add table
Add a link
Reference in a new issue