瀏覽代碼

GRASS_VERSION_SVN -> GRASS_VERSION_GIT + update g.version

Martin Landa 6 年之前
父節點
當前提交
3ff0587094

+ 1 - 1
Makefile

@@ -54,7 +54,7 @@ FILES = AUTHORS CHANGES CITING COPYING GPL.TXT INSTALL REQUIREMENTS.html contrib
 FILES_DST = $(patsubst %,$(ARCH_DISTDIR)/%,$(FILES))
 
 default:
-	@echo "GRASS GIS $(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR).$(GRASS_VERSION_RELEASE) $(GRASS_VERSION_SVN) compilation log" \
+	@echo "GRASS GIS $(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR).$(GRASS_VERSION_RELEASE) $(GRASS_VERSION_GIT) compilation log" \
 		> $(ERRORLOG)
 	@echo "--------------------------------------------------" >> $(ERRORLOG)
 	@echo "Started compilation: `date`"                        >> $(ERRORLOG)

文件差異過大導致無法顯示
+ 687 - 740
configure


+ 7 - 9
configure.in

@@ -126,14 +126,12 @@ changequote(,)
 LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
 changequote([,])
 
-GRASS_VERSION_SVN="exported"
-AC_PATH_PROG(SVN_VERSION, svnversion, no)
-if test "$SVN_VERSION" != "no" ; then
-   GRASS_VERSION_SVN=`$SVN_VERSION -c | cut -f2 -d:`
-   if test "$GRASS_VERSION_SVN" = "exported" -o "$GRASS_VERSION_SVN" = "Unversioned directory" ; then
-      GRASS_VERSION_SVN="exported"
-   else
-      GRASS_VERSION_SVN="r$GRASS_VERSION_SVN"
+GRASS_VERSION_GIT="exported"
+AC_PATH_PROG(GIT, git, no)
+if test "$GIT" != "no" ; then
+   GRASS_VERSION_GIT=`$GIT rev-parse --short HEAD 2>/dev/null`
+   if test -z "$GRASS_VERSION_GIT"; then
+      GRASS_VERSION_GIT="exported"
    fi
 fi
 
@@ -143,7 +141,7 @@ AC_SUBST(GRASS_VERSION_MINOR)
 AC_SUBST(GRASS_VERSION_RELEASE)
 AC_SUBST(GRASS_VERSION_NUMBER)
 AC_SUBST(GRASS_VERSION_DATE)
-AC_SUBST(GRASS_VERSION_SVN)
+AC_SUBST(GRASS_VERSION_GIT)
 AC_SUBST(NAME_VER)
 AC_SUBST(LIB_VER)
 

+ 1 - 1
general/g.version/Makefile

@@ -8,7 +8,7 @@ PGM=g.version
 EXTRA_CFLAGS = $(PROJINC) $(GDALCFLAGS) $(GEOSCFLAGS) $(SQLITEINCPATH) \
 	-DGRASS_VERSION_NUMBER=\"'$(GRASS_VERSION_NUMBER)'\" \
 	-DGRASS_VERSION_DATE=\"'$(GRASS_VERSION_DATE)'\" \
-	-DGRASS_VERSION_SVN=\"'$(GRASS_VERSION_SVN)'\" \
+	-DGRASS_VERSION_GIT=\"'$(GRASS_VERSION_GIT)'\" \
 	-DGRASS_VERSION_UPDATE_PKG=\"'$(GRASS_VERSION_UPDATE_PKG)'\" \
 	-DARCH=\"'$(ARCH)'\"
 

+ 2 - 2
general/g.version/main.c

@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
 
     shell = G_define_flag();
     shell->key = 'g';
-    shell->description = _("Print info in shell script style (including SVN revision number)");
+    shell->description = _("Print info in shell script style (including Git reference commit)");
     shell->guisection = _("Shell");
 
     if (G_parser(argc, argv))
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
     if (shell->answer) {
 	fprintf(stdout, "version=%s\n", GRASS_VERSION_NUMBER);
 	fprintf(stdout, "date=%s\n", GRASS_VERSION_DATE);
-	fprintf(stdout, "revision=%s\n", GRASS_VERSION_SVN);
+	fprintf(stdout, "revision=%s\n", GRASS_VERSION_GIT);
 	fprintf(stdout, "build_date=%d-%02d-%02d\n", YEAR, MONTH, DAY);
 	fprintf(stdout, "build_platform=%s\n", ARCH);
         fprintf(stdout, "build_off_t_size=%lu\n", sizeof(off_t));

+ 1 - 1
include/Make/Doxyfile_arch_html.in

@@ -32,7 +32,7 @@ PROJECT_NAME           = "GRASS GIS @GRASS_VERSION_MAJOR@ Programmer's Manual"
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@(@GRASS_VERSION_DATE@)-@GRASS_VERSION_SVN@
+PROJECT_NUMBER         = @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@(@GRASS_VERSION_DATE@)-@GRASS_VERSION_GIT@
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer

+ 1 - 1
include/Make/Doxyfile_arch_latex.in

@@ -32,7 +32,7 @@ PROJECT_NAME           = "GRASS GIS @GRASS_VERSION_MAJOR@ Programmer's Manual"
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@(@GRASS_VERSION_DATE@)-@GRASS_VERSION_SVN@
+PROJECT_NUMBER         = @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@(@GRASS_VERSION_DATE@)-@GRASS_VERSION_GIT@
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer

+ 1 - 1
include/Make/Platform.make.in

@@ -46,7 +46,7 @@ GRASS_VERSION_MAJOR = @GRASS_VERSION_MAJOR@
 GRASS_VERSION_MINOR = @GRASS_VERSION_MINOR@
 GRASS_VERSION_RELEASE = @GRASS_VERSION_RELEASE@
 GRASS_VERSION_DATE  = @GRASS_VERSION_DATE@
-GRASS_VERSION_SVN   = @GRASS_VERSION_SVN@
+GRASS_VERSION_GIT   = @GRASS_VERSION_GIT@
 
 STRIPFLAG           = @STRIPFLAG@
 LD_SEARCH_FLAGS     = @LD_SEARCH_FLAGS@

+ 1 - 1
include/VERSION

@@ -1,4 +1,4 @@
 7
 7
-svn
+dev
 2019

+ 2 - 2
lib/init/Makefile

@@ -95,8 +95,8 @@ $(ETC)/winlocale$(EXE): $(OBJDIR)/winlocale.o
 
 $(ETC)/VERSIONNUMBER:
 	rm -f $@
-	@if [ -n "$(GRASS_VERSION_SVN)" ] ; then \
-		echo "$(GRASS_VERSION_NUMBER) $(GRASS_VERSION_SVN)" > $@ ; \
+	@if [ -n "$(GRASS_VERSION_GIT)" ] ; then \
+		echo "$(GRASS_VERSION_NUMBER) $(GRASS_VERSION_GIT)" > $@ ; \
 	else \
 		echo "$(GRASS_VERSION_NUMBER)" > $@ ; \
 	fi