mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Publish SNAPSHOT artifact
This commit is contained in:
parent
1be49dad02
commit
f5fad90815
1 changed files with 36 additions and 1 deletions
|
|
@ -43,6 +43,9 @@ NC='\033[0m' # No Color
|
|||
|
||||
RELEASE_VERSION="$1"
|
||||
GIT_TAG="$2"
|
||||
if [[ $RELEASE_VERSION == *"SNAPSHOT"* ]]; then
|
||||
DO_SNAPSHOT="yes"
|
||||
fi
|
||||
|
||||
PUBLISH_PROFILES="-Ppublish-distr -Pspark-2.1 -Phadoop-2.6 -Pyarn -Ppyspark -Psparkr -Pr"
|
||||
PROJECT_OPTIONS="-pl !zeppelin-distribution"
|
||||
|
|
@ -67,6 +70,34 @@ function curl_error() {
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Publishing Apache Zeppelin artifact to Apache snapshot repository.
|
||||
#
|
||||
function publish_snapshot_to_maven() {
|
||||
cd "${WORKING_DIR}/zeppelin"
|
||||
echo "Deploying Apache Zeppelin $RELEASE_VERSION version to snapshot repository."
|
||||
|
||||
if [[ ! $RELEASE_VERSION == *"SNAPSHOT"* ]]; then
|
||||
echo "ERROR: Snapshots must have a version containing 'SNAPSHOT'"
|
||||
echo "ERROR: You gave version '$RELEASE_VERSION'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mvn versions:set -DnewVersion=$RELEASE_VERSION
|
||||
tmp_settings="tmp-settings.xml"
|
||||
echo "<settings><servers><server>" > $tmp_settings
|
||||
echo "<id>apache.snapshots.https</id><username>$ASF_USERID</username>" >> $tmp_settings
|
||||
echo "<password>$ASF_PASSWORD</password>" >> $tmp_settings
|
||||
echo "</server></servers></settings>" >> $tmp_settings
|
||||
|
||||
mvn --settings $tmp_settings -DskipTests $PUBLISH_PROFILES -Drat.skip=true deploy
|
||||
"${BASEDIR}/change_scala_version.sh" 2.11
|
||||
mvn -Pscala-2.11 --settings $tmp_settings -DskipTests $PUBLISH_PROFILES -Drat.skip=true clean deploy
|
||||
|
||||
rm $tmp_settings
|
||||
}
|
||||
|
||||
function publish_to_maven() {
|
||||
cd "${WORKING_DIR}/zeppelin"
|
||||
|
||||
|
|
@ -153,5 +184,9 @@ function publish_to_maven() {
|
|||
}
|
||||
|
||||
git_clone
|
||||
publish_to_maven
|
||||
if [[ "${DO_SNAPSHOT}" == 'yes' ]]; then
|
||||
publish_snapshot_to_maven
|
||||
else
|
||||
publish_to_maven
|
||||
fi
|
||||
cleanup
|
||||
|
|
|
|||
Loading…
Reference in a new issue