v1.1.23
authoradam <adamansky@gmail.com>
Tue, 3 Sep 2013 16:54:48 +0000 (23:54 +0700)
committeradam <adamansky@gmail.com>
Tue, 3 Sep 2013 16:54:48 +0000 (23:54 +0700)
Changelog
tcejdb/Changelog
tcejdb/configure
tcejdb/configure.ac
tcejdb/debian/changelog
tcejdb/tcutil.h
tools/release.sh

index 8712b59..97da4dd 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,10 @@
+libtcejdb (1.1.23) testing; urgency=low
+
+  * Fixed crash with $elemMatch inside $and #96
+  * Memleak #97
+
+ -- Anton Adamansky <adamansky@gmail.com>  Tue, 03 Sep 2013 23:47:39 +0700
+
 libtcejdb (1.1.22) testing; urgency=low
 
   * Testing new package build script
index 8712b59..97da4dd 100644 (file)
@@ -1,3 +1,10 @@
+libtcejdb (1.1.23) testing; urgency=low
+
+  * Fixed crash with $elemMatch inside $and #96
+  * Memleak #97
+
+ -- Anton Adamansky <adamansky@gmail.com>  Tue, 03 Sep 2013 23:47:39 +0700
+
 libtcejdb (1.1.22) testing; urgency=low
 
   * Testing new package build script
index f53c352..f289e0d 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tcejdb 1.1.21.
+# Generated by GNU Autoconf 2.69 for tcejdb 1.1.23.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tcejdb'
 PACKAGE_TARNAME='tcejdb'
-PACKAGE_VERSION='1.1.21'
-PACKAGE_STRING='tcejdb 1.1.21'
+PACKAGE_VERSION='1.1.23'
+PACKAGE_STRING='tcejdb 1.1.23'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1268,7 +1268,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures tcejdb 1.1.21 to adapt to many kinds of systems.
+\`configure' configures tcejdb 1.1.23 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1333,7 +1333,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tcejdb 1.1.21:";;
+     short | recursive ) echo "Configuration of tcejdb 1.1.23:";;
    esac
   cat <<\_ACEOF
 
@@ -1439,7 +1439,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tcejdb configure 1.1.21
+tcejdb configure 1.1.23
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1737,7 +1737,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tcejdb $as_me 1.1.21, which was
+It was created by tcejdb $as_me 1.1.23, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -5273,7 +5273,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tcejdb $as_me 1.1.21, which was
+This file was extended by tcejdb $as_me 1.1.23, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5326,7 +5326,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tcejdb config.status 1.1.21
+tcejdb config.status 1.1.23
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 18ae77d..e665975 100644 (file)
@@ -10,7 +10,7 @@ test -n "$CPPFLAGS" && MYCPPFLAGS="$CPPFLAGS $MYCPPFLAGS"
 test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS $MYLDFLAGS"
 
 # Package name
-AC_INIT(tcejdb,1.1.22)
+AC_INIT(tcejdb, 1.1.23)
 AC_CANONICAL_HOST
 
 # Package information
index 8712b59..97da4dd 100644 (file)
@@ -1,3 +1,10 @@
+libtcejdb (1.1.23) testing; urgency=low
+
+  * Fixed crash with $elemMatch inside $and #96
+  * Memleak #97
+
+ -- Anton Adamansky <adamansky@gmail.com>  Tue, 03 Sep 2013 23:47:39 +0700
+
 libtcejdb (1.1.22) testing; urgency=low
 
   * Testing new package build script
index 1869859..cf649d0 100644 (file)
@@ -3733,7 +3733,7 @@ typedef unsigned char TCBITMAP; /* type of a bit map object */
 
 #include <stdio.h>
 
-#define _TC_VERSION    "1.1.21"
+#define _TC_VERSION    "1.1.23"
 #define _TC_LIBVER     911
 #define _TC_FORMATVER  "1.0"
 
index 737f4c2..396d323 100755 (executable)
@@ -6,30 +6,137 @@ PPA=ppa:adamansky/ejdb
 
 function error() { echo "ERROR $*"; }
 
+function usage() {
+cat << EOF
+    Usage: release.sh old|new|<version> [command, ...]
+
+    Commands:
+        dput - Perform PPA dput
+        npm - Publish package to npmjs.org
+        w32 - Perform w32 build
+        w64 - Perform w64 build
+
+EOF
+    exit 1;
+}
+
+function _npm() {
+    echo "Building npm package";
+    cd ${EJDB_HOME}
+    sed -i 's/\"version\" *\: *.*\,/"version" : \"'"$1"'\"\,/' ./package.json
+    sed -r -i 's/tcejdb-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+-/tcejdb-'"$1"'-/' ./package.json || exit $?
+    make clean
+    ##npm publish || exit $?
+    exit 0;
+}
+
+function _dput() {
+   echo "Building debian packages";
+   cd "${EJDB_HOME}"
+   rm -f *.upload
+   rm -f libtcejdb*.tar.gz libtcejdb*.tgz libtcejdb*.deb libtcejdb*.changes libtcejdb*.build libtcejdb*.dsc
+   make -C "${EJDB_HOME}" deb-source-packages-tcejdb
+   #dput "${VERSION}"
+   echo "Uploading into RARING"
+   dput -c tools/dput-raring.cf "${PPA}" "./libtcejdb_${1}_source.changes" || exit $?
+   rm -f *.upload
+   echo "Uploading into QUANTAL"
+   dput -c tools/dput-quantal.cf "${PPA}" "./libtcejdb_${1}_source.changes" || exit $?
+   exit 0;
+}
+
+function _win() {
+  echo "Building ${1} binaries"
+  cd ${EJDB_HOME}
+  ${EJDB_HOME}/tcejdb/mxe/mxe-build.sh ../../mxe $1 || exit $?
+  #tcejdb-1.1.22-mingw32-i686.zip
+  if [ "${1}" == "w32" ]; then
+    cp ${EJDB_HOME}/tcejdb/tcejdb-${2}-mingw32-i686.zip ${HOME}/Dropbox/Public/ejdb
+  elif [ "${1}" == "w64" ]; then
+    cp ${EJDB_HOME}/tcejdb/tcejdb-${2}-mingw32-x86_64.zip ${HOME}/Dropbox/Public/ejdb
+  fi
+  exit 0;
+}
+
 function tcejdb() {
     TCEJDB_HOME="${EJDB_HOME}/tcejdb"
     VERSION="$1"
-    if [ -z ${VERSION} ]; then
-       error "$VERSION";
+    shift;
+    CMDS="$1 $2 $3 $4"
+
+    if [[ -z ${VERSION} ]]; then
+       VERSION="new";
     fi
+
+    if [[ -z ${CMDS} ]]; then
+       VERSION="new dput w32 w64 npm";
+    fi
+
     cd ${TCEJDB_HOME}
     autoconf
     CPKG=$(cat configure.ac | grep AC_INIT| sed 's/.*(\(.*\)).*/\1/'| awk -F, '{print $1}')
     CVERSION=$(cat configure.ac | grep AC_INIT| sed 's/.*(\(.*\)).*/\1/'| awk -F, '{print $2}');
+
+    if [[ ${VERSION} == "new" ]]; then
+        which "semver" > /dev/null || {
+           echo "Missing 'semver', npm -g install semver";
+           exit 1;
+        }
+        VERSION=`semver -i ${CVERSION}` || {
+            echo "Unable to increment version: ${CVERSION}";
+            exit 1;
+        }
+        echo "Version changed: ${CVERSION} => ${VERSION}";
+
+    elif [[ ${VERSION} == "old" ]]; then
+        echo "Using old version ${CVERSION}";
+        VERSION=${CVERSION};
+    fi
+
+    (echo "$VERSION" | grep -E '[[:digit:]]+\.[[:digit:]]+.[[:digit:]]+') > /dev/null || {
+        echo "Invalid version: $VERSION";
+        exit 1;
+    }
+
     if [[ ${VERSION} != ${CVERSION} ]]; then
-        echo "Updating configure.ac version"
-        sed -i 's/AC_INIT( *'"$CPKG"' *, *'"$CVERSION"' */AC_INIT('"$CPKG"','"$VERSION"'/' configure.ac
-        autoconf
         dch -Dtesting -v"${VERSION}" || exit $?
-        make -C "${EJDB_HOME}" deb-source-packages-tcejdb
-        cd ${EJDB_HOME}
-       dput -c tools/dput-raring.cf "${PPA}" "./libtcejdb_${VERSION}_source.changes"
+        cp ./debian/changelog ./Changelog || exit $?
+        cp ./debian/changelog ../Changelog || exit $?
+        echo "Updating configure.ac version"
+        sed -i 's/AC_INIT( *'"$CPKG"' *, *'"$CVERSION"' */AC_INIT('"$CPKG"', '"$VERSION"'/' ./configure.ac || exit $?
+        touch ./configure.ac
+        rm -rf ./configure ./config.status ./config.log ./autom4te.cache
+        autoconf -o ./configure ./configure.ac
+        (./configure && \
+            make clean version && \
+            make && \
+            make -C ./testejdb all check && \
+            make clean) || exit $?
     else
         echo "The configure.ac version up-to-date"
-        exit 0;
     fi
 
+    for c in ${CMDS}
+    do
+        case "$c" in
+            "dput" )
+                _dput ${VERSION} || exit $?
+            ;;
+            "npm" )
+                _npm ${VERSION} || exit $?
+            ;;
+            "w32" )
+                _win "w32" ${VERSION} || exit $?
+             ;;
+            "w64" )
+                _win "w64" ${VERSION} || exit $?
+            ;;
+            * )
+                echo "Invalid command";
+                usage
+            ;;
+        esac
+    done
 }
 
-
 tcejdb $*