diff --git a/Makefile b/Makefile index 50bb7254f..72bda14ed 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ MAJOR_VER := v5 PACKAGE := github.com/dundee/$(NAME)/$(MAJOR_VER) CMD_GDU := cmd/gdu VERSION := $(shell git describe --tags 2>/dev/null) +DATE := $(shell date +'%Y-%m-%d') GOFLAGS ?= -buildmode=pie -trimpath -mod=readonly -modcacherw LDFLAGS := -s -w -extldflags '-static' \ -X '$(PACKAGE)/build.Version=$(VERSION)' \ @@ -46,7 +47,9 @@ build-all: cd dist; for file in gdu_windows_*; do zip $$file.zip $$file; done gdu.1: gdu.1.md - pandoc gdu.1.md -s -t man > gdu.1 + sed 's/{{date}}/$(DATE)/g' gdu.1.md > gdu.1.date.md + pandoc gdu.1.date.md -s -t man > gdu.1 + rm -f gdu.1.date.md man: gdu.1 cp gdu.1 dist diff --git a/gdu.1 b/gdu.1 index be3456a17..c086cf8ee 100644 --- a/gdu.1 +++ b/gdu.1 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.14.0.2 .\" -.TH "gdu" "1" "Jan 2021" "" "" +.TH "gdu" "1" "2021-08-24" "" "" .hy .SH NAME .PP diff --git a/gdu.1.md b/gdu.1.md index dad9fd3bf..e2aee8738 100644 --- a/gdu.1.md +++ b/gdu.1.md @@ -1,5 +1,5 @@ --- -date: Jan 2021 +date: {{date}} section: 1 title: gdu --- @@ -78,4 +78,4 @@ flag with following meaning: **e** -: Directory is empty. \ No newline at end of file +: Directory is empty.