Skip to content

Commit

Permalink
Removed unused org.omg.CORBA import. (#80)
Browse files Browse the repository at this point in the history
* Removed unused org.omg.CORBA import.

* Added release.sh script and associated files for building the artifacts.

#79
  • Loading branch information
beebs-systap authored Sep 17, 2020
1 parent 8e57ea5 commit 36e0ff8
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
artifacts/
**/target/
pom.xml.versionsBackup
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.amazonaws.services.neptune.util.Timer;
import com.github.rvesse.airline.annotations.restrictions.ranges.IntegerRange;
import org.apache.tinkerpop.gremlin.driver.ResultSet;
import org.omg.CORBA.INTERNAL;

import java.io.IOException;
import java.util.HashMap;
Expand Down
100 changes: 100 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/bin/bash

# Copyright 2020 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file.
# This file 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.
VERSION_FILE="VERSION"
GIT_CMD=`which git`

GIT_BRANCH=`${GIT_CMD} branch | grep \* | cut -d' ' -f2`

if [ ! -f "$VERSION_FILE" ] ; then
echo "Version file not present. Please create and retry."
exit 1
fi

if [ "$GIT_BRANCH" != "mainline" ] ; then
echo "WARNING: Starting a release from a non-mainline branch."
fi

let NEW_VERSION=`cat $VERSION_FILE`+1
VERSION_STRING="1.${NEW_VERSION}"
echo $NEW_VERSION > $VERSION_FILE


echo "Starting release for $VERSION_STRING"

RELEASE_BRANCH="amazon-neptune-tools-$VERSION_STRING"


echo "Creating new release branch: $RELEASE_BRANCH"

$GIT_CMD checkout -b $RELEASE_BRANCH

#Utility script to build the jars to make a release.
ARTIFACT_DIR=`pwd`/artifacts
rm -rf $ARTIFACT_DIR
mkdir -p $ARTIFACT_DIR
MAVEN_ARTIFACTS="neo4j-to-neptune neptune-export neptune-gremlin-client"
for artifact in $MAVEN_ARTIFACTS; do
pushd $artifact >& /dev/null
mvn versions:set -DnewVersion=${VERSION_STRING} versions:update-child-modules
mvn clean
mvn package
#All of the jars are shaded. Only take the shaded, bundled jars.
for jar in `find . -name "*.jar" -print | grep -vE "SNAPSHOT|original|\-$VERSION_STRING"`; do
cp $jar $ARTIFACT_DIR
done
popd >& /dev/null
done

#Also get the non-shaded gremlin-client jar
cp "neptune-gremlin-client/gremlin-client/target/gremlin-client-$VERSION_STRING.jar" $ARTIFACT_DIR

#Build the glue-neptune artifact
pushd glue-neptune >& /dev/null
./build.sh
cp target/glue_neptune.zip $ARTIFACT_DIR
popd >& /dev/null

cp ./graphml2csv/graphml2csv.py $ARTIFACT_DIR

#drop-graph needs to be installed as a module
#cp ./drop-graph/drop-graph.py $ARTIFACT_DIR

${GIT_CMD} commit -a -m "POM version updates for $RELEASE_BRANCH"

echo "Creating Release Tag"

${GIT_CMD} tag -a $RELEASE_BRANCH -m "amazon-neptune-tools Release ${VERSION_STRING}"

repo=origin

echo "Pushing the release branch to $repo."
${GIT_CMD} push "${repo}" refs/heads/${RELEASE_BRANCH}

echo "Pushing the release tags to $repo."
${GIT_CMD} push "${repo}" refs/tags/${RELEASE_BRANCH}

#Update the VERSION on mainline

${GIT_CMD} checkout mainline
echo $NEW_VERSION > $VERSION_FILE
${GIT_CMD} pull $repo mainline
${GIT_CMD} commit -am "Incremented release version to `cat $VERSION_FILE`"
${GIT_CMD} push $repo mainline

#Return to the initial branch
${GIT_CMD} checkout ${GIT_BRANCH}

echo "To complete the release, upload the contents of artifacts/ to the ${RELEASE_BRANCH} tag on github: https://github.com/awslabs/amazon-neptune-tools/releases."

0 comments on commit 36e0ff8

Please sign in to comment.