Mercurial > hg > forks > geeqie
annotate gen_changelog.sh @ 2916:ae6cdcd69d9f default tip
Merge with upstream/master.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 14 May 2019 11:46:50 +0300 |
parents | f98daed316ae |
children |
rev | line source |
---|---|
1290
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
1 #!/bin/bash |
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
2 |
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
3 # Script to update ChangeLog file, |
2646
37235424378e
Auto-generate README and ChangeLog html user docs
Colin Clark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
4 # it keeps "pre-svn" history and inserts git log at top, |
1290
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
5 # it uses C locale for date format. |
2654
f98daed316ae
Addl fix #532: Remove Changelog.html and Readme.html from Makefile.am
Colin Clark <colin.clark@cclark.uk>
parents:
2649
diff
changeset
|
6 # It has to be run where ChangeLog.gqview is. |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2352
diff
changeset
|
7 # |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2352
diff
changeset
|
8 # ChangeLog.html is also created |
1290
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
9 |
2654
f98daed316ae
Addl fix #532: Remove Changelog.html and Readme.html from Makefile.am
Colin Clark <colin.clark@cclark.uk>
parents:
2649
diff
changeset
|
10 [ ! -e "ChangeLog.gqview" ] && exit 1 |
2648
e083bab50112
Fix #532: Remove Changelog.html and Readme.html from Makefile.am
Colin Clark <colin.clark@cclark.uk>
parents:
2646
diff
changeset
|
11 [ ! -x "$(command -v git)" ] && exit 0 |
1290
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
12 |
2649
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
13 LC_ALL=C git log --no-merges --no-notes --encoding=UTF-8 --no-follow --use-mailmap 1b58572cf58e9d2d4a0305108395dab5c66d3a09..HEAD > ChangeLog.$$.new && \ |
2654
f98daed316ae
Addl fix #532: Remove Changelog.html and Readme.html from Makefile.am
Colin Clark <colin.clark@cclark.uk>
parents:
2649
diff
changeset
|
14 cat ChangeLog.gqview >> ChangeLog.$$.new && \ |
1290
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
15 mv -f ChangeLog.$$.new ChangeLog |
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
16 |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2352
diff
changeset
|
17 |
2649
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
18 echo "<textarea rows='6614' cols='100'>" >ChangeLog.$$.old.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
19 tail -6613 ChangeLog >> ChangeLog.$$.old.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
20 echo "</textarea>" >>ChangeLog.$$.old.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
21 echo "<html>" > ChangeLog.$$.new.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
22 echo "<body>" >> ChangeLog.$$.new.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
23 echo "<ul>" >> ChangeLog.$$.new.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
24 LC_ALL=C git log --no-merges --no-notes --encoding=UTF-8 --date=format:'%Y-%m-%d' --no-follow --use-mailmap --pretty=format:"<li><a href=\"http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commit;h=%H\">view commit </a></li><p>Author: %aN<br>Date: %ad<br><textarea rows=4 cols=100>%s %n%n%b</textarea><br><br></p>" 1b58572cf58e9d2d4a0305108395dab5c66d3a09..HEAD >> ChangeLog.$$.new.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
25 echo "" >> ChangeLog.$$.new.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
26 cat ChangeLog.$$.old.html >> ChangeLog.$$.new.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
27 echo "</ul>" >> ChangeLog.$$.new.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
28 echo "</body>" >> ChangeLog.$$.new.html && \ |
1636031e5f27
Fixing changelog generation
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2648
diff
changeset
|
29 echo "</html>" >> ChangeLog.$$.new.html |
2646
37235424378e
Auto-generate README and ChangeLog html user docs
Colin Clark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
30 [ -e ChangeLog.html ] && mv -f ChangeLog.html ChangeLog.html.bak |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2352
diff
changeset
|
31 mv -f ChangeLog.$$.new.html ChangeLog.html |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2352
diff
changeset
|
32 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2352
diff
changeset
|
33 rm -f ChangeLog.$$.old.html |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2352
diff
changeset
|
34 |
1290
9e7a236b31c9
Update ChangeLog using C locale date format, add a script to ease future updates.
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
35 exit 0 |