Release scripts.
diff --git a/juneau-release.sh b/juneau-release.sh
index f2518f6..93a69ab 100755
--- a/juneau-release.sh
+++ b/juneau-release.sh
@@ -32,57 +32,87 @@
exit 1;
}
+function message {
+ echo ' '
+ echo '-------------------------------------------------------------------------------'
+ echo '> $1'
+ echo '-------------------------------------------------------------------------------'
+ echo ' '
+ exit 1;
+}
+
+
function yprompt {
+ echo ' '
echo -n "$1 (Y/n): "
read prompt
if [ "$prompt" != "Y" ] && [ "$prompt" != "" ]
then
fail;
fi
-
}
cd ~/.m2
+
+message "Cleaning existing Git repository"
mv repository repository-old
rm -rf repository-old &
rm -rf $X_STAGING
mkdir -p $X_STAGING
mkdir $X_STAGING/git
cd $X_STAGING/git
+
+message "Cloning juneau.git"
git clone https://gitbox.apache.org/repos/asf/juneau.git
+
+message "Cloning juneau-website.git"
git clone https://gitbox.apache.org/repos/asf/juneau-website.git
+
cd juneau
git config user.name $X_USERNAME
git config user.email $X_EMAIL
+message "Checking Java version"
java -version
yprompt "Are you using at least Java 8?";
+message "Checking Maven version"
mvn -version
yprompt "Are you using at least Maven 3?"
+message "Running clean verify"
cd $X_STAGING/git/juneau
mvn clean verify
+message "Running javadoc:aggregate"
mvn javadoc:aggregate
yprompt "Is the javadoc generation clean?"
-yprompt "Can juneau/juneau-microservice/juneau-my-jetty-microservice/target/my-jetty-microservice-$X_VERSION.bin.zip be deployed into an Eclipse workspace?"
-yprompt "Can juneau/juneau-microservice/juneau-my-springboot-microservice/target/my-springboot-microservice-$X_VERSION.bin.zip be deployed into an Eclipse workspace?"
-yprompt "Can juneau/juneau-examples/juneau-examples-rest-jetty/target/juneau-examples-rest-jetty-$X_VERSION.bin.zip be deployed into an Eclipse workspace?"
-yprompt "Can juneau/juneau-examples/juneau-examples-rest-springboot/target/juneau-examples-rest-springboot-$X_VERSION.bin.zip be deployed into an Eclipse workspace?"
+message "Creating test workspace"
+export WORKSPACE=target/workspace
+rm -Rf $WORKSPACE
+mkdir -p $WORKSPACE
+unzip -o juneau-microservice/juneau-my-jetty-microservice/target/my-jetty-microservice-$X_VERSION-bin.zip -d $WORKSPACE/my-jetty-microservice
+unzip -o juneau-microservice/juneau-my-springboot-microservice/target/my-springboot-microservice-$X_VERSION-bin.zip -d $WORKSPACE/my-springboot-microservice
+unzip -o juneau-examples/juneau-examples-core/target/juneau-examples-core-$X_VERSION-bin.zip -d $WORKSPACE/juneau-examples-core
+unzip -o juneau-examples/juneau-examples-rest-jetty/target/juneau-examples-rest-jetty-$X_VERSION-bin.zip -d $WORKSPACE/juneau-examples-rest-jetty
+unzip -o juneau-examples/juneau-examples-rest-springboot/target/juneau-examples-rest-springboot-$X_VERSION-bin.zip -d $WORKSPACE/juneau-examples-rest-springboot
+yprompt "Can all workspace projecs in $X_STAGING/git/juneau/target/workspace be cleanly imported into Eclipse?"
+
+message "Running deploy"
cd $X_STAGING/git/juneau
mvn deploy
+message "Running release:prepare"
mvn release:prepare -DautoVersionSubmodules=true -DreleaseVersion=$X_VERSION -Dtag=$X_RELEASE -DdevelopmentVersion=$X_NEXT_VERSION
-
yprompt "Did the release:prepare command succeed?"
+message "Running git diff"
git diff $X_RELEASE
+message "Running release:perform"
mvn release:perform
-
open "https://repository.apache.org/#stagingRepositories"
echo "On Apache's Nexus instance, locate the staging repository for the code you just released. It should be called something like orgapachejuneau-1000."
@@ -98,6 +128,7 @@
yprompt "X_REPO = $X_REPO. Is this correct?"
+message "Creating binary artifacts"
cd $X_STAGING
rm -rf dist
svn co https://dist.apache.org/repos/dist/dev/juneau dist
diff --git a/launches/juneau-create-workspace.launch b/launches/juneau-create-workspace.launch
new file mode 100644
index 0000000..b347f20
--- /dev/null
+++ b/launches/juneau-create-workspace.launch
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/juneau-root/launches/juneau-create-workspace.sh}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/juneau-root}"/>
+</launchConfiguration>
diff --git a/launches/juneau-create-workspace.sh b/launches/juneau-create-workspace.sh
new file mode 100755
index 0000000..4603500
--- /dev/null
+++ b/launches/juneau-create-workspace.sh
@@ -0,0 +1,28 @@
+# ***************************************************************************************************************************
+# * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+# * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+# * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+# * with the License. You may obtain a copy of the License at *
+# * *
+# * http://www.apache.org/licenses/LICENSE-2.0 *
+# * *
+# * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+# * specific language governing permissions and limitations under the License. *
+# ***************************************************************************************************************************
+
+. launches/juneau-env.sh
+
+export WORKSPACE=target/workspace
+
+rm -Rf $WORKSPACE
+mkdir -p $WORKSPACE
+unzip -o juneau-microservice/juneau-my-jetty-microservice/target/my-jetty-microservice-$X_VERSION-bin.zip -d $WORKSPACE/my-jetty-microservice
+unzip -o juneau-microservice/juneau-my-springboot-microservice/target/my-springboot-microservice-$X_VERSION-bin.zip -d $WORKSPACE/my-springboot-microservice
+unzip -o juneau-examples/juneau-examples-core/target/juneau-examples-core-$X_VERSION-bin.zip -d $WORKSPACE/juneau-examples-core
+unzip -o juneau-examples/juneau-examples-rest-jetty/target/juneau-examples-rest-jetty-$X_VERSION-bin.zip -d $WORKSPACE/juneau-examples-rest-jetty
+unzip -o juneau-examples/juneau-examples-rest-springboot/target/juneau-examples-rest-springboot-$X_VERSION-bin.zip -d $WORKSPACE/juneau-examples-rest-springboot
+
+echo '*******************************************************************************'
+echo '***** SUCCESS *****************************************************************'
+echo '*******************************************************************************'
diff --git a/launches/juneau-env.sh b/launches/juneau-env.sh
index 9b371f1..1dbd0f6 100755
--- a/launches/juneau-env.sh
+++ b/launches/juneau-env.sh
@@ -14,3 +14,4 @@
. ~/.profile
set -e
export JUNEAU_VERSION=8.0.0
+[ -z "$X_VERSION" ] && export X_VERSION="${JUNEAU_VERSION}-SNAPSHOT"