mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-29 09:31:24 +01:00
hook
This commit is contained in:
parent
a821591514
commit
7d8cf43383
@ -30,7 +30,7 @@
|
|||||||
<url type="donation">https://martinrotter.github.io/donate/</url>
|
<url type="donation">https://martinrotter.github.io/donate/</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="3.5.6" date="2018-02-26">
|
<release version="3.5.7" date="2019-04-04">
|
||||||
<description>
|
<description>
|
||||||
<p>Fixed:</p>
|
<p>Fixed:</p>
|
||||||
<ul>
|
<ul>
|
||||||
@ -42,8 +42,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</description>
|
</description>
|
||||||
</release>
|
</release>
|
||||||
<release version="3.5.5" date="2017-11-19"/>
|
<release version="3.5.7" date="2019-04-04"/>
|
||||||
<release version="3.5.4" date="2017-10-23"/>
|
|
||||||
</releases>
|
</releases>
|
||||||
<provides>
|
<provides>
|
||||||
<binary>rssguard</binary>
|
<binary>rssguard</binary>
|
||||||
|
16
resources/scripts/hooks/pre-commit
Normal file
16
resources/scripts/hooks/pre-commit
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -- resources/desktop/*.appdata.xml
|
||||||
|
appdata_file="$1"
|
||||||
|
appdata_file_n="${1}.n"
|
||||||
|
changelog_file="resources/text/CHANGELOG"
|
||||||
|
|
||||||
|
# Set version and date.
|
||||||
|
datestring="$(date +%F)"
|
||||||
|
versionstring="$(head -n 1 "$changelog_file")"
|
||||||
|
|
||||||
|
cat "$appdata_file" | sed -e "s@release version\=\"[A-Za-z0-9.]*\"@release version\=\"$versionstring\"@g" | sed -e "s@ date\=\"[0-9\-]*\"@ date\=\"$datestring\"@g" > "$appdata_file_n"
|
||||||
|
mv "$appdata_file_n" "$appdata_file"
|
||||||
|
|
||||||
|
git add "$appdata_file"
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user