Skip to content

Commit

Permalink
Add gitversion.sh to distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jul 4, 2017
1 parent 357d97c commit 2627823
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ TOP_EXTRA_DIST = \
Platforms.txt \
README.txt \
index.html \
gitversion.sh \
version.sh \
winpath.sh

Expand Down Expand Up @@ -284,7 +285,7 @@ magick-version: MagickCore/version.h
fi ; \
touch magick-version

${srcdir}/configure: ${srcdir}/version.sh
${srcdir}/configure: ${srcdir}/version.sh ${srcdir}/gitversion.sh

# Automagically reconfigure libtool
LIBTOOL_DEPS = @LIBTOOL_DEPS@
Expand Down
3 changes: 2 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2961,6 +2961,7 @@ TOP_EXTRA_DIST = \
Platforms.txt \
README.txt \
index.html \
gitversion.sh \
version.sh \
winpath.sh

Expand Down Expand Up @@ -11718,7 +11719,7 @@ magick-version: MagickCore/version.h
fi ; \
touch magick-version

${srcdir}/configure: ${srcdir}/version.sh
${srcdir}/configure: ${srcdir}/version.sh ${srcdir}/gitversion.sh
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck

Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -4519,7 +4519,7 @@ MAGICK_PATCHLEVEL_VERSION=1

MAGICK_VERSION=7.0.6-1

MAGICK_GIT_REVISION=20293:51f5e90:20170703
MAGICK_GIT_REVISION=20297:357d97c:20170704


# Substitute library versioning
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ m4_define([magick_micro_version], [6])
m4_define([magick_patchlevel_version], [1])
m4_define([magick_version],
[magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
m4_define([magick_git_revision], esyscmd([sh -c "(gitversion .) | tr -d '\n'"]))
m4_define([magick_git_revision], esyscmd([sh -c "(gitversion.sh .) | tr -d '\n'"]))
m4_define([magick_tar_name],[ImageMagick])

# ==============================================================================
Expand Down
8 changes: 8 additions & 0 deletions gitversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
git_rev ()
{
d=`date +%Y%m%d`
c=`git rev-list --full-history --all --abbrev-commit | wc -l | sed -e 's/^ *//'`
h=`git rev-list --full-history --all --abbrev-commit | head -1`
echo ${c}:${h}:${d}
}
git_rev

0 comments on commit 2627823

Please sign in to comment.