[cmor] 16/190: 2010-05-27 : switch version tagging from svn to git 2010-05-27 : fixed abug in test patch number of NetCDF3 version i was using = instead of ==
Alastair McKinstry
mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository cmor.
commit 6d8287d15f9b04ed7ad594a165723eaddc338853
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date: Thu May 27 18:05:02 2010 -0700
2010-05-27 : switch version tagging from svn to git
2010-05-27 : fixed abug in test patch number of NetCDF3 version i was using = instead of ==
---
RELEASE-NOTES | 2 ++
Src/cmor.c | 2 +-
configure | 7 ++-----
configure.ac | 7 ++-----
get_git_version.sh | 7 +++++++
get_svn_version.sh | 7 -------
show_git.c | 15 ++++-----------
show_svn.c | 18 ------------------
8 files changed, 18 insertions(+), 47 deletions(-)
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 61df3b6..9edb7c6 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,5 @@
+2010-05-27 : switch version tagging from svn to git
+2010-05-27 : fixed abug in test patch number of NetCDF3 version i was using = instead of ==
2010-05-25 : trying a new way to store date in file names for Jamie. Probably going to be reverted
2010-05-24 : changed the way the final file name is constructed, uses time bounds if present, otherwise as before uses time values
2010-05-20 : tagging RC9
diff --git a/Src/cmor.c b/Src/cmor.c
index 9f97d76..7e6443f 100644
--- a/Src/cmor.c
+++ b/Src/cmor.c
@@ -350,7 +350,7 @@ int cmor_have_NetCDF363(void) {
int major,minor,patch;
strncpy(version,nc_inq_libvers(),50);
sscanf(version,"%*c%1d%*c%1d%*c%1d%*s",&major,&minor,&patch);
- if ( (major==3) && (minor==6) && (patch=3)) return 0;
+ if ( (major==3) && (minor==6) && (patch==3)) return 0;
return 1;
}
diff --git a/configure b/configure
index c485ba9..c9adebd 100755
--- a/configure
+++ b/configure
@@ -1718,10 +1718,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-SVN_TAG="rev"`./get_svn_version.sh`
-if test ${SVN_TAG} == "rev" ; then
- SVN_TAG=""
-fi
+GIT_TAG=`./get_git_version.sh`
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -1891,7 +1888,7 @@ case ${target_os} in
;;
esac
-CMOR_VERSION=${PACKAGE_VERSION}${SVN_TAG}
+CMOR_VERSION=${PACKAGE_VERSION}" (commit: ${GIT_TAG})"
ac_config_files="$ac_config_files Makefile setup.py compile_line.txt"
diff --git a/configure.ac b/configure.ac
index 3f027fb..90f7a11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,10 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl AC_PREREQ(2.59)
AC_INIT(cmor, 2.0, doutriaux1 at llnl.gov)
-SVN_TAG="rev"`./get_svn_version.sh`
-if test ${SVN_TAG} == "rev" ; then
- SVN_TAG=""
-fi
+GIT_TAG=`./get_git_version.sh`
AC_CANONICAL_TARGET
echo "TARGET: "${target_os}
@@ -21,7 +18,7 @@ case ${target_os} in
;;
esac
-CMOR_VERSION=${PACKAGE_VERSION}${SVN_TAG}
+CMOR_VERSION=${PACKAGE_VERSION}" (commit: ${GIT_TAG})"
AC_PREFIX_DEFAULT([/usr/local/cmor])
AC_CONFIG_FILES([Makefile setup.py compile_line.txt])
diff --git a/get_git_version.sh b/get_git_version.sh
new file mode 100755
index 0000000..7d27fa7
--- /dev/null
+++ b/get_git_version.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+
+if [ "X"${CC} = "X" ] ; then
+ gcc show_git.c -o a.out ; ./a.out ; rm a.out
+else
+ ${CC} show_git.c -o a.out ; ./a.out ; rm a.out
+fi
diff --git a/get_svn_version.sh b/get_svn_version.sh
deleted file mode 100755
index 25fbcb2..0000000
--- a/get_svn_version.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env sh
-
-if [ "X"${CC} = "X" ] ; then
- gcc show_svn.c -o a.out ; ./a.out ; rm a.out
-else
- ${CC} show_svn.c -o a.out ; ./a.out ; rm a.out
-fi
diff --git a/show_git.c b/show_git.c
index 6dcc56c..a5be51c 100644
--- a/show_git.c
+++ b/show_git.c
@@ -3,16 +3,9 @@
#define R_OK 4
int main() {
FILE *fp;
- char s1[50],s2[50];
- int version,i,j ;
- i = access(".svn/entries",R_OK);
- if (i < 0) {
- return 0;
- }
- else {
- fp = popen("svn info| grep Revision ","r");
- fscanf(fp,"%s%d",s1,&version);
- printf("%i\n",version);
- }
+ char s1[50];
+ fp = popen("git log -n 1 --pretty=\"format:%H\" ","r");
+ fscanf(fp,"%s",s1);
+ printf("%s\n",s1);
return 0;
}
diff --git a/show_svn.c b/show_svn.c
deleted file mode 100644
index 6dcc56c..0000000
--- a/show_svn.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#define R_OK 4
-int main() {
- FILE *fp;
- char s1[50],s2[50];
- int version,i,j ;
- i = access(".svn/entries",R_OK);
- if (i < 0) {
- return 0;
- }
- else {
- fp = popen("svn info| grep Revision ","r");
- fscanf(fp,"%s%d",s1,&version);
- printf("%i\n",version);
- }
- return 0;
-}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cmor.git
More information about the debian-science-commits
mailing list