Skip to content

Commit d401f08

Browse files
author
Alec Leamas
committed
Add manpage_date helper script
1 parent 239c8a0 commit d401f08

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

CONTRIBUTE.md

+11-16
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ Creating a new version (maintainer work)
144144

145145
- Update NEWS file.
146146

147+
- Check Last Changed in all manpages.
148+
147149
- Commit and tag the release: git tag 0.7.1
148150

149151
- Create fedora package:
@@ -155,28 +157,22 @@ Creating a new version (maintainer work)
155157
rm -rf rpmbuild
156158
rpmbuild-here -ba *.spec
157159

158-
- Copy tarball and repo to debian and commit it on pristine-tar
160+
- Possibly iterate. When done, merge to master and push with
161+
tags:
162+
163+
$ git checkout master
164+
$ git merge devel
165+
$ git push --tags origin master:master
166+
$ git push origin devel:devel
159167

160-
git fetch upstream debian:debian
161-
git fetch upstream pristine-tar:pristine-tar
162-
scp fedora/ddupdate-0.7.1.tar.gz sid:
163-
cd ..; ssh sid rm -rf ddupdate.git
164-
scp -rq ddupdate sid:ddupdate.git
165-
ssh sid
166-
cd ddupdate; rm -rf *
167-
mv ../ddupdate-0.7.1.tar.gz ddupdate_0.7.1.orig.tar.gz
168-
git clone -o upstream -b debian ../ddupdate.git ddupdate
169-
cd ddupdate
170-
git remote add github [email protected]:leamas/ddupdate.git
171-
git fetch upstream pristine-tar:pristine-tar
172-
pristine-tar commit ../ddupdate_0.7.1.orig.tar.gz 0.7.1
168+
- Copy tarball and repo to debian and commit it on pristine-tar
173169

174170
- Upload to pypi:
175171

176172
$ python setup.py sdist
177173
$ twine upload dist/*
178174

179-
- Create debian test huild on sid::
175+
- Create debian test build on sid::
180176

181177
$ cd ddupdate/ddupdate
182178
$ sudo mk-build-deps -i -r debian/control
@@ -185,7 +181,6 @@ Creating a new version (maintainer work)
185181
$ dch -v 0.7.1-1
186182
$ git commit -am "debian: 0.7.1-1"
187183
$ Check systemd/ddupdate.service
188-
$ dpkg-source --commit
189184
$ git commit -a --amend
190185
$ git clean -fd
191186
$ gbp buildpackage --git-upstream-tag=0.7.1 -us -uc

ddupdate.conf.5

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH DDUPDATE.CONF "5" "Last change: Jan 2018" "ddupdate.comf" "File Formats Manual"
1+
.TH DDUPDATE.CONF "5" "Last change: Jan 2022" "ddupdate.comf" "File Formats Manual"
22

33
.SH NAME
44
\fBddupdate.conf\fR - ddupdate configuration file.

manpage_date

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/bash
2+
#
3+
# Update a manpage "Last Change" field using the last git commit as date
4+
#
5+
# Usage:
6+
# manpage_date <manpage source file>
7+
8+
date=$(git log -1 --pretty="format:%ad" --date="format:%B %Y" $1)
9+
date=$(echo $date | awk '{print substr($1, 1, 3) " " $2}')
10+
sed -i "s/Last change:.*[0-9]/Last change: $date/" $1

0 commit comments

Comments
 (0)