Prepare for Git migration.

Mass-replace "svn" with "git". Add commented code to use git to fetch
the repository version.

svn path=/trunk/; revision=54905
This commit is contained in:
Gerald Combs 2014-01-22 18:15:44 +00:00
parent 6b7fc8f0ef
commit 2b26c1e216
8 changed files with 35 additions and 30 deletions

View File

@ -208,7 +208,7 @@ set(WSDG_GRAPHICS
# user-guide.xml must be first in the list
set(WSUG_SOURCE
user-guide.xml
svn_version.xml
git_version.xml
wsluarm
${WSUG_FILES}
${WSUG_GRAPHICS}
@ -217,7 +217,7 @@ set(WSUG_SOURCE
# developer-guide.xml must be first in the list
set(WSDG_SOURCE
developer-guide.xml
svn_version.xml
git_version.xml
${WSDG_FILES}
${WSDG_GRAPHICS}
)
@ -242,11 +242,11 @@ find_package( ASCIIDOC )
ADD_CUSTOM_COMMAND(
OUTPUT
svn_version.xml
git_version.xml
COMMAND ${SH}
${CMAKE_CURRENT_SOURCE_DIR}/check_svn_version.sh
${CMAKE_CURRENT_SOURCE_DIR}/check_git_version.sh
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/check_svn_version.sh
${CMAKE_CURRENT_SOURCE_DIR}/check_git_version.sh
)
add_custom_target(

View File

@ -57,10 +57,10 @@ endif
if HAVE_XSLTPROC
ALL_TARGETS=svn_version_check wsug wsdg release_notes
ALL_TARGETS=git_version_check wsug wsdg release_notes
else
# if we don't have XSLTPROC, there's nothing to do...
ALL_TARGETS=svn_version_check
ALL_TARGETS=git_version_check
endif
all: $(ALL_TARGETS)
@ -71,10 +71,10 @@ all: $(ALL_TARGETS)
# FORCE is the portable version of .PHONY
FORCE:
svn_version_check: FORCE
cat $(srcdir)/check_svn_version.sh | tr -d '\015' | /bin/bash
git_version_check: FORCE
cat $(srcdir)/check_git_version.sh | tr -d '\015' | /bin/bash
svn_version.xml: svn_version_check
git_version.xml: git_version_check
# Wireshark User Guide
if HAVE_FOP
@ -258,7 +258,7 @@ EXTRA_DIST = \
$(WSUG_SOURCE) \
$(WSDG_SOURCE) \
$(RELEASE_NOTES_SOURCE) \
check_svn_version.sh \
check_git_version.sh \
docbook.vcproj \
dfilter2xml.pl \
make-wsluarm.pl \

View File

@ -189,7 +189,7 @@ WSDG_GRAPHICS = \
# user-guide.xml must be first in the list (to match $<)
WSUG_SOURCE = \
user-guide.xml \
svn_version.xml \
git_version.xml \
GPL_appendix.xml \
custom_layer_pdf.xsl \
Makefile.common \
@ -199,7 +199,7 @@ WSUG_SOURCE = \
# developer-guide.xml must be first in the list (to match $<)
WSDG_SOURCE = \
developer-guide.xml \
svn_version.xml \
git_version.xml \
GPL_appendix.xml \
custom_layer_pdf.xsl \
Makefile.common \
@ -228,7 +228,7 @@ CLEANFILES = \
release_notes_chm \
release-notes.html \
release-notes.txt \
svn_version.xml \
git_version.xml \
user-guide.zip \
wsluarm

View File

@ -33,10 +33,10 @@ A2X_TEXT_OPTS=$(A2X_TEXT_OPTS) --lynx
.SUFFIXES: .fo .pdf
# On every build, record the working copy revision string
# in svn_version.xml (if the svn version has changed).
# in git_version.xml (if the svn version has changed).
# This is done during nmake "preprocessing" so that it's done *before*
# nmake gets the date/time of the dependency file(s)].
!IF [$(SH) ./check_svn_version.sh]
!IF [$(SH) ./check_git_version.sh]
!ENDIF

View File

@ -21,19 +21,24 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
#
echo -n '<!ENTITY SvnVersion "' > svn_version_tmp.xml
[ -x svnversion ] && svnversion -n . >> svn_version_tmp.xml
echo '">' >> svn_version_tmp.xml
#if [ -d ../.git ] ; then
# GIT_VERSION=`git describe --tags --dirty`
#fi
#echo '<!ENTITY GitVersion "'${GIT_VERSION}'">' > git_version_tmp.xml
echo -n '<!ENTITY GitVersion "' > git_version_tmp.xml
[ -x svnversion ] && svnversion -n . >> git_version_tmp.xml
echo '">' >> git_version_tmp.xml
# /dev/null buries the output of the "cmp" command.
diff svn_version.xml svn_version_tmp.xml &> /dev/null
diff git_version.xml git_version_tmp.xml &> /dev/null
if [ $? -ne 0 ]
then
cp svn_version_tmp.xml svn_version.xml
cp git_version_tmp.xml git_version.xml
fi
rm svn_version_tmp.xml
rm git_version_tmp.xml

View File

@ -28,7 +28,7 @@ DOCUMENT SECTION
-->
<!ENTITY DocumentTitle "<application>Wireshark</application> Developer's Guide">
<!ENTITY DocumentSubTitle "&SvnVersion; for Wireshark &WiresharkCurrentVersion;">
<!ENTITY DocumentSubTitle "&GitVersion; for Wireshark &WiresharkCurrentVersion;">
<!ENTITY DocumentTitleAbbreviation "WSDG">
<!ENTITY DocumentCopyrightHolder "Ulf Lamping">
@ -37,8 +37,8 @@ DOCUMENT SECTION
<!ENTITY DocumentEdition "Draft">
<!ENTITY DocumentVersion "Draft 0.0.3">
<!ENTITY DocumentPubDate "2008">
<!ENTITY % SvnVersionFile SYSTEM "svn_version.xml">
%SvnVersionFile;
<!ENTITY % GitVersionFile SYSTEM "git_version.xml">
%GitVersionFile;
<!ENTITY DocumentLegalNotice "<para>Permission is granted to copy, distribute
and/or modify this document under the terms of the GNU General Public

View File

@ -269,7 +269,7 @@
</File>
</Filter>
<File
RelativePath=".\check_svn_version.sh"
RelativePath=".\check_git_version.sh"
>
</File>
<File

View File

@ -61,7 +61,7 @@ DOCUMENT SECTION
-->
<!ENTITY DocumentTitle "<application>Wireshark</application> User's Guide">
<!ENTITY DocumentSubTitle "&SvnVersion; for Wireshark &WiresharkCurrentVersion;">
<!ENTITY DocumentSubTitle "&GitVersion; for Wireshark &WiresharkCurrentVersion;">
<!ENTITY DocumentTitleAbbreviation "WSUG">
<!ENTITY DocumentCopyrightHolder1 "Ulf Lamping ">
@ -73,8 +73,8 @@ DOCUMENT SECTION
<!ENTITY DocumentVersion "V3.0.2">
<!ENTITY DocumentPubDate "2008">
<!ENTITY % SvnVersionFile SYSTEM "svn_version.xml">
%SvnVersionFile;
<!ENTITY % GitVersionFile SYSTEM "git_version.xml">
%GitVersionFile;
<!ENTITY DocumentLegalNotice "<para>Permission is granted to copy, distribute
and/or modify this document under the terms of the GNU General Public
License, Version 2 or any later version published by the Free Software