Skip to content

Commit 1167490

Browse files
committed
add project dir and version consts to pdc.sh
1 parent 82bb085 commit 1167490

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/vagrant/provision-dev-cluster.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15+
1516
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1617
echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list
1718
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF
@@ -70,6 +71,8 @@ update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
7071
readonly IP_ADDRESS=192.168.33.7
7172
readonly MESOS_VERSION=0.28.2-2.0.27
7273
readonly MARATHON_VERSION=1.1.2-1.0.482
74+
readonly PROJECT_HOME_DIR='/home/vagrant/marathon'
75+
readonly PROJECT_VERSION=`mvn -f $PROJECT_HOME_DIR/pom.xml org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }'`
7376

7477

7578
function install_mesos {
@@ -84,10 +87,13 @@ function install_docker_compose {
8487
pip install docker-compose
8588
}
8689

90+
function get_pom_version {
91+
mvn -f ${PROJECT_HOME_DIR}/pom.xml org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }'
92+
}
8793

8894
function build_docker_compose_executor {
8995
mvn -f /home/vagrant/marathon/pom.xml clean package -U
90-
chmod 777 /home/vagrant/marathon/target/docker-compose-executor_0.0.1.jar
96+
chmod 777 /home/vagrant/marathon/target/docker-compose-executor_${PROJECT_VERSION}.jar
9197
}
9298

9399
function install_cluster_config {

0 commit comments

Comments
 (0)