forked from deeplearning4j/deeplearning4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: 651f271
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
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,39 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
if [[ $# < 3 ]]; then | ||
echo "Usage: bash perform-release.sh release_version snapshot_version staging_repository" | ||
exit 1 | ||
fi | ||
|
||
RELEASE_VERSION=$1 | ||
SNAPSHOT_VERSION=$2 | ||
STAGING_REPOSITORY=$3 | ||
|
||
echo "Releasing version $RELEASE_VERSION ($SNAPSHOT_VERSION) to repository $STAGING_REPOSITORY" | ||
echo "========================================================================================" | ||
|
||
if [[ ! -z $(git tag -l "deeplearning4j-$RELEASE_VERSION") ]]; then | ||
echo "Error: Version $RELEASE_VERSION has already been released!" | ||
exit 1 | ||
fi | ||
|
||
sed -i "s/<nd4j.version>.*<\/nd4j.version>/<nd4j.version>$RELEASE_VERSION<\/nd4j.version>/" pom.xml | ||
sed -i "s/<datavec.version>.*<\/datavec.version>/<datavec.version>$RELEASE_VERSION<\/datavec.version>/" pom.xml | ||
mvn versions:set -DallowSnapshots=true -DgenerateBackupPoms=false -DnewVersion=$RELEASE_VERSION | ||
|
||
source change-scala-versions.sh 2.10 | ||
mvn clean deploy -Dgpg.executable=gpg2 -DperformRelease -Psonatype-oss-release -DskipTests -DstagingRepositoryId=$STAGING_REPOSITORY | ||
source change-scala-versions.sh 2.11 | ||
mvn clean deploy -Dgpg.executable=gpg2 -DperformRelease -Psonatype-oss-release -DskipTests -DstagingRepositoryId=$STAGING_REPOSITORY | ||
|
||
source change-scala-versions.sh 2.10 | ||
git commit -a -m "Update to version $RELEASE_VERSION" | ||
git tag -a -m "deeplearning4j-$RELEASE_VERSION" "deeplearning4j-$RELEASE_VERSION" | ||
|
||
sed -i "s/<nd4j.version>.*<\/nd4j.version>/<nd4j.version>$SNAPSHOT_VERSION<\/nd4j.version>/" pom.xml | ||
sed -i "s/<datavec.version>.*<\/datavec.version>/<datavec.version>$SNAPSHOT_VERSION<\/datavec.version>/" pom.xml | ||
mvn versions:set -DallowSnapshots=true -DgenerateBackupPoms=false -DnewVersion=$SNAPSHOT_VERSION | ||
git commit -a -m "Update to version $SNAPSHOT_VERSION" | ||
|
||
echo "Successfully performed release of version $RELEASE_VERSION ($SNAPSHOT_VERSION) to repository $STAGING_REPOSITORY" |