Skip to content

Commit

Permalink
report version upon startup
Browse files Browse the repository at this point in the history
  • Loading branch information
cobbzilla committed Dec 12, 2013
1 parent b6dfe01 commit 613ab89
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.cobbzilla</groupId>
<artifactId>s3s3mirror</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<licenses>
Expand Down
2 changes: 1 addition & 1 deletion s3s3mirror.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
java -jar target/s3s3mirror-1.0.0-SNAPSHOT.jar %*
java -Ds3s3mirror.version=1.1.0 -jar target/s3s3mirror-1.1.0-SNAPSHOT.jar %*
8 changes: 5 additions & 3 deletions s3s3mirror.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ THISDIR=$(dirname $0)
cd ${THISDIR}
THISDIR=$(pwd)

JARFILE=target/s3s3mirror-1.0.0-SNAPSHOT.jar
VERSION=1.1.0
JARFILE=target/s3s3mirror-${VERSION}-SNAPSHOT.jar
VERSION_ARG="-Ds3s3mirror.version=${VERSION}"

DEBUG=$1
if [ "${DEBUG}" = "--debug" ] ; then
# Run in debug mode
shift # remove --debug from options
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 -jar ${JARFILE} "$@"
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 ${VERSION_ARG} -jar ${JARFILE} "$@"

else
# Run in regular mode
java -jar ${JARFILE} "$@"
java ${VERSION_ARG} -jar ${JARFILE} "$@"
fi

exit $?
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/cobbzilla/s3s3mirror/MirrorMaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@Slf4j
public class MirrorMaster {

public static final String VERSION = System.getProperty("s3s3mirror.version");

private final AmazonS3Client client;
private final MirrorContext context;
private final Object notifyLock = new Object();
Expand All @@ -24,6 +26,8 @@ public MirrorMaster(AmazonS3Client client, MirrorContext context) {

public void mirror() {

log.info("version "+VERSION+" starting");

final MirrorOptions options = context.getOptions();
final boolean verbose = options.isVerbose();

Expand Down
Binary file removed target/s3s3mirror-1.0.0-SNAPSHOT.jar
Binary file not shown.
Binary file modified target/s3s3mirror-1.1.0-SNAPSHOT.jar
Binary file not shown.

0 comments on commit 613ab89

Please sign in to comment.