Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revision signature in About #1319

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.15.4
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ data_convertdir = $(datadir)/GConf/gsettings
dist_data_convert_DATA = liferea.convert

EXTRA_DIST = \
.version \
version.sh \
net.sf.liferea.gschema.xml.in \
po/liferea.pot \
$(desktop_in_files) \
Expand Down
3 changes: 3 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ if [ "$tmp" = "" ]; then
exit 1
fi

rm -f configure aclocal.m4 autom4te.cache/*
rmdir --ignore-fail-on-non-empty autom4te.cache
find . -iname "Makefile" -o -iname "Makefile.in" -o -iname "Makefile.in.in" -type f -exec rm -f '{}' +
autoreconf -i
intltoolize
if test -z "$NOCONFIGURE"; then
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.

AC_INIT([liferea],[1.15.4],[[email protected]])
AC_INIT([liferea],[m4_esyscmd([./version.sh|tr -d '\n'])],[[email protected]])
AC_CANONICAL_HOST
AC_CONFIG_SRCDIR([src/feedlist.c])

Expand Down
24 changes: 24 additions & 0 deletions version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env sh

set -eu
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this makes sense, I think if git is not available in a build system it'll make the script fail. Maybe I should remove this altogether or reverse the conditional to check for the non git case first.


DIR=$(dirname "$0")

VER_FILE="${DIR}/.version"

touch -c "${VER_FILE}"

if [ -d "$DIR/.git" ]; then
EXACT_TAG=$(git name-rev --name-only --tags HEAD)
if [ "$EXACT_TAG" = 'undefined' ]; then
HEAD=$(git rev-parse --short HEAD)
DATE=$(git log -1 --format=%cd --date=format:'%Y-%m-%d')
VER="${HEAD}"-"${DATE}"
else
VER="$EXACT_TAG"
fi
else
VER="$(head -1 "${VER_FILE}")"
fi

echo "$VER"
Loading