-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed unused org.omg.CORBA import. (#80)
* Removed unused org.omg.CORBA import. * Added release.sh script and associated files for building the artifacts. #79
- Loading branch information
1 parent
8e57ea5
commit 36e0ff8
Showing
4 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
artifacts/ | ||
**/target/ | ||
pom.xml.versionsBackup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |