You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2017/12/06 00:40:02 UTC

mesos git commit: Added a script to publish JARs to maven snapshot repository.

Repository: mesos
Updated Branches:
  refs/heads/master cf27a2fcf -> 75ebbbe9f


Added a script to publish JARs to maven snapshot repository.

This could be used to publish JARs from nightly builds. Most of the
code is copied from support/tag.sh.

Review: https://reviews.apache.org/r/59029/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/75ebbbe9
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/75ebbbe9
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/75ebbbe9

Branch: refs/heads/master
Commit: 75ebbbe9fbe51fd9dcbb66ea8fa6758cc5cd6d59
Parents: cf27a2f
Author: Vinod Kone <vi...@apache.org>
Authored: Tue Dec 5 16:39:48 2017 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Dec 5 16:39:48 2017 -0800

----------------------------------------------------------------------
 support/snapshot.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/75ebbbe9/support/snapshot.sh
----------------------------------------------------------------------
diff --git a/support/snapshot.sh b/support/snapshot.sh
new file mode 100755
index 0000000..c30aca0
--- /dev/null
+++ b/support/snapshot.sh
@@ -0,0 +1,69 @@
+#!/usr/bin/env bash
+
+# This script should be used to publish a snapshot JAR to Apache Maven
+# repo from the current HEAD.
+
+set -e
+
+# Use 'atexit' for cleanup.
+. $(dirname ${0})/atexit.sh
+
+# Use colors for errors.
+. $(dirname ${0})/colors.sh
+
+test ${#} -eq 1 || \
+  { echo "Usage: `basename ${0}` [version]"; exit 1; }
+
+VERSION=${1}
+TAG="${VERSION}-SNAPSHOT"
+
+echo "${GREEN}Deploying ${TAG}${NORMAL}"
+
+read -p "Hit enter to continue ... "
+
+WORK_DIR=`mktemp -d /tmp/mesos-tag-XXXX`
+atexit "rm -rf ${WORK_DIR}"
+
+# Get the absolute path of the local git clone.
+MESOS_GIT_LOCAL=$(cd "$(dirname $0)"/..; pwd)
+
+pushd ${WORK_DIR}
+
+# Make a shallow clone from the local git repository.
+git clone --shared ${MESOS_GIT_LOCAL} mesos
+
+pushd mesos
+
+# Ensure configure.ac has the correct version.
+echo "Confirming that configure.ac contains ${VERSION}"
+grep "\[mesos\], \[${VERSION}\]" configure.ac
+
+echo "${GREEN}Updating configure.ac to include 'SNAPSHOT'.${NORMAL}"
+sed -i '' "s/\[mesos\], \[.*\]/[mesos], [${TAG}]/" configure.ac
+
+# Build mesos.
+./bootstrap
+mkdir build
+pushd build
+../configure --disable-optimize
+
+# First build the protobuf compiler.
+# TODO(vinod): This is short term fix for MESOS-959.
+pushd 3rdparty
+make -j3
+popd
+
+# Build and deploy the jar.
+make -j3 maven-install
+mvn deploy -f src/java/mesos.pom
+
+echo "${GREEN}Successfully deployed the jar to maven snapshot repository ...${NORMAL}"
+
+popd # build
+
+popd # mesos
+popd # ${WORK_DIR}
+
+echo "${GREEN}Success!${NORMAL}"
+
+exit 0