Release 1.5.6 for Java code + Script to automate it.

Test Plan: it compiles and deploys.

Reviewers: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D7341
This commit is contained in:
Abhishek Kona 2012-12-12 16:29:29 -08:00
parent 3d1e92b05a
commit 2585979fd7
9 changed files with 167 additions and 75 deletions

View File

@ -1,14 +1,86 @@
#!/bin/bash -e
cd $LEVELDB_HOME
git apply $LEVELDB_HOME/java/leveldbjni/db.h.patch
make clean libleveldb.a
cd $LEVELDB_HOME
cd java/leveldb/leveldb-api
mvn clean package
export JAVA_HOME=/usr/local/jdk-6u14-64/
export LEVELDBJNI_HOME=$LEVELDB_HOME/java/leveldbjni/
export SNAPPY_HOME=/home/dhruba/snappy-1.0.5
cd $LEVELDBJNI_HOME
mvn clean install -P linux64
cd $LEVELDB_HOME
git checkout $LEVELDB_HOME/include/leveldb/db.h
function print_usage {
echo "Usage: $0 [build | release | bump_version version ]"
}
function check_env {
if [ -z $LEVELDB_HOME ] ; then
echo "Expect LEVELDB_HOME to be SET"
exit 1
fi
if [ -z $JAVA_HOME ] ; then
export JAVA_HOME=/usr/local/jdk-6u14-64/
echo "JAVA_HOME not set. Assuming JAVA_HOME=$JAVA_HOME"
fi
if [ -z $LEVELDBJNI_HOME ] ; then
export LEVELDBJNI_HOME=$LEVELDB_HOME/java/leveldbjni/
echo "LEVELDBJNI_HOME not set. Assuming LEVELDBJNI_HOME=$LEVELDBJNI_HOME"
fi
if [ -z $SNAPPY_HOME ] ; then
export SNAPPY_HOME="/home/dhruba/snappy-1.0.5"
echo "SNAPPY_HOME not set. Assuming SNAPPY_HOME=$SNAPPY_HOME"
fi
if [ -z $LEVELDB_PATCH ] ; then
LEVELDB_PATCH=$LEVELDB_HOME/java/leveldbjni/db.h.patch
echo "LEVELDB_PATCH not set. Assuming LEVELDB_PATCH=$LEVELDB_PATCH"
fi
}
function build {
cd $LEVELDB_HOME
git apply $LEVELDB_PATCH
make clean libleveldb.a
cd $LEVELDB_HOME/java/leveldb/leveldb-api
mvn clean package
cd $LEVELDBJNI_HOME
mvn clean install -P linux64
cd $LEVELDB_HOME
git checkout $LEVELDB_HOME/include/leveldb/db.h
}
function release {
cd $LEVELDB_HOME
git apply $LEVELDB_PATCH
make clean libleveldb.a
cd $LEVELDB_HOME/java/leveldb/leveldb-api
mvn clean package
cd $LEVELDBJNI_HOME
mvn deploy -P linux64 -DskipTests
cd $LEVELDB_HOME
git checkout $LEVELDB_HOME/include/leveldb/db.h
}
CMD=$1
if [ -z $CMD ]; then
print_usage
exit 1
fi
case "$CMD" in
build)
check_env
build
;;
bump_version)
if [ -z $2 ] ; then
echo "bump_version requires a version.no parameter at the end"
exit 1
fi
check_env
VERSION=$2
pushd $LEVELDBJNI_HOME
mvn versions:set -DnewVersion="$VERSION"
popd
echo "VERSION SET TO $VERSION"
;;
release)
check_env
pushd $LEVELDBJNI_HOME
release
popd
;;
*)
print_usage
exit 1
;;
esac

View File

@ -34,43 +34,43 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-project</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-all</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<name>${project.artifactId}</name>
<description>An uber jar which contains all the leveldbjni platform libraries and dependencies</description>
<dependencies>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-osx</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-linux32</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-linux64</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-win32</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-win64</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
</dependencies>

View File

@ -34,23 +34,23 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-project</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-linux32</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<name>${project.artifactId}</name>
<description>The leveldbjni linux 32 native libraries</description>
<dependencies>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
</dependencies>
@ -82,7 +82,7 @@
<name>leveldbjni</name>
<classified>false</classified>
<nativeSrcDependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>${project.version}</version>
<classifier>native-src</classifier>

View File

@ -34,23 +34,23 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-project</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-linux64</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<name>${project.artifactId}</name>
<description>The leveldbjni linux 64 native libraries</description>
<dependencies>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
</dependencies>
@ -81,7 +81,7 @@
<name>leveldbjni</name>
<classified>false</classified>
<nativeSrcDependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>${project.version}</version>
<classifier>native-src</classifier>

View File

@ -34,29 +34,29 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-project</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-osx</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<name>${project.artifactId}</name>
<description>The leveldbjni OS X universal native libraries</description>
<dependencies>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
@ -90,7 +90,7 @@
<name>leveldbjni</name>
<classified>false</classified>
<nativeSrcDependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>${project.version}</version>
<classifier>native-src</classifier>

View File

@ -34,23 +34,23 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-project</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-win32</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<name>${project.artifactId}</name>
<description>The leveldbjni Windows 32 bit native libraries</description>
<dependencies>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
</dependencies>
@ -82,7 +82,7 @@
<name>leveldbjni</name>
<classified>false</classified>
<nativeSrcDependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>${project.version}</version>
<classifier>native-src</classifier>

View File

@ -34,23 +34,23 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-project</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-win64</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<name>${project.artifactId}</name>
<description>The leveldbjni Windows 64 bit native libraries</description>
<dependencies>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</dependency>
</dependencies>
@ -81,7 +81,7 @@
<name>leveldbjni</name>
<classified>false</classified>
<nativeSrcDependency>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>${project.version}</version>
<classifier>native-src</classifier>

View File

@ -34,14 +34,14 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-project</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
</parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<packaging>jar</packaging>
<name>${project.artifactId}</name>

View File

@ -39,9 +39,9 @@
<version>1.9</version>
</parent>
<groupId>org.fusesource.leveldbjni</groupId>
<groupId>org.fusesource.leveldbjni.fb</groupId>
<artifactId>leveldbjni-project</artifactId>
<version>99-master-SNAPSHOT</version>
<version>1.5.6</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
@ -53,6 +53,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<hawtjni-version>1.6</hawtjni-version>
<leveldb-api-version>0.4</leveldb-api-version>
<project.nexus.hostPort>nexus.vip.facebook.com:8181</project.nexus.hostPort>
<project.java.version>1.7</project.java.version>
<project.libs-releases-local-url>
http://${project.nexus.hostPort}/nexus/content/repositories/libs-releases-local
</project.libs-releases-local-url>
<project.libs-snapshots-local-url>
http://${project.nexus.hostPort}/nexus/content/repositories/libs-snapshots-local
</project.libs-snapshots-local-url>
</properties>
<modules>
@ -95,11 +103,14 @@
</scm>
<distributionManagement>
<site>
<id>website.fusesource.org</id>
<name>website</name>
<url>dav:http://fusesource.com/forge/dav/${forge-project-id}/maven/${project.version}</url>
</site>
<repository>
<id>libs-releases-local</id>
<url>${project.libs-releases-local-url}</url>
</repository>
<snapshotRepository>
<id>libs-snapshots-local</id>
<url>${project.libs-snapshots-local-url}</url>
</snapshotRepository>
</distributionManagement>
<developers>
@ -141,6 +152,15 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>