Release tool scripts changes
This commit is contained in:
67
etc/release-tools/apps-upgrade-dryrun.sh
Executable file
67
etc/release-tools/apps-upgrade-dryrun.sh
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Please specify the release and core parent versions"
|
||||
exit
|
||||
fi
|
||||
|
||||
pushd ../..
|
||||
|
||||
VERSION=$1
|
||||
PARENT_VERSION=$2
|
||||
|
||||
function iterate_through_apps_folders_and_update {
|
||||
|
||||
./mvnw -Ddisable.checks=true -f $BASE_DIR versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
|
||||
./mvnw -Ddisable.checks=true -f $BASE_DIR versions:update-parent -DparentVersion=$PARENT_VERSION -Pspring -DgenerateBackupPoms=false
|
||||
|
||||
cd $BASE_DIR
|
||||
|
||||
# Remove any lingering apps folders
|
||||
find . -name "apps" -type d -exec rm -r "{}" \;
|
||||
|
||||
for folder in *; do
|
||||
[ -d "${folder}" ] || continue # if not a directory, skip
|
||||
echo "FOLDER NAME - ${folder}"
|
||||
pushd ${folder}
|
||||
../../../mvnw -Ddisable.checks=true versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
|
||||
../../../mvnw -Ddisable.checks=true versions:update-parent -DparentVersion=$PARENT_VERSION -Pspring -DgenerateBackupPoms=false
|
||||
popd
|
||||
done
|
||||
|
||||
cd ../../
|
||||
|
||||
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
lines=$(find $BASE_DIR -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Snapshots found under $BASE_DIR. Exiting build"
|
||||
find $BASE_DIR -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
lines=$(find $BASE_DIR -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Non Release versions found under $BASE_DIR. Exiting build"
|
||||
find $BASE_DIR -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
BASE_DIR=applications/source
|
||||
iterate_through_apps_folders_and_update
|
||||
|
||||
BASE_DIR=applications/sink
|
||||
iterate_through_apps_folders_and_update
|
||||
|
||||
BASE_DIR=applications/processor
|
||||
iterate_through_apps_folders_and_update
|
||||
|
||||
popd
|
||||
74
etc/release-tools/apps-upgrade.sh
Executable file
74
etc/release-tools/apps-upgrade.sh
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Please specify the release and core parent versions"
|
||||
exit
|
||||
fi
|
||||
|
||||
function git_commit_push {
|
||||
echo "in git commit"
|
||||
git commit -am"Source Applications: Release - $VERSION"
|
||||
git push origin master && git push upstream master
|
||||
}
|
||||
|
||||
function iterate_through_apps_folders_and_update {
|
||||
|
||||
./mvnw -Ddisable.checks=true -f $BASE_DIR versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
|
||||
./mvnw -Ddisable.checks=true -f $BASE_DIR versions:update-parent -DparentVersion=$PARENT_VERSION -Pspring -DgenerateBackupPoms=false
|
||||
|
||||
cd $BASE_DIR
|
||||
|
||||
# Remove any lingering apps folders
|
||||
find . -name "apps" -type d -exec rm -r "{}" \;
|
||||
|
||||
for folder in *; do
|
||||
[ -d "${folder}" ] || continue # if not a directory, skip
|
||||
echo "FOLDER NAME - ${folder}"
|
||||
pushd ${folder}
|
||||
../../../mvnw -Ddisable.checks=true versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
|
||||
../../../mvnw -Ddisable.checks=true versions:update-parent -DparentVersion=$PARENT_VERSION -Pspring -DgenerateBackupPoms=false
|
||||
popd
|
||||
done
|
||||
|
||||
cd ../../
|
||||
|
||||
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
lines=$(find $BASE_DIR -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Snapshots found under $BASE_DIR. Exiting build"
|
||||
find $BASE_DIR -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
lines=$(find $BASE_DIR -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Non Release versions found under $BASE_DIR. Exiting build"
|
||||
find $BASE_DIR -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pushd ../..
|
||||
|
||||
VERSION=$1
|
||||
PARENT_VERSION=$2
|
||||
|
||||
BASE_DIR=applications/source
|
||||
iterate_through_apps_folders_and_update
|
||||
|
||||
BASE_DIR=applications/sink
|
||||
iterate_through_apps_folders_and_update
|
||||
|
||||
BASE_DIR=applications/processor
|
||||
iterate_through_apps_folders_and_update
|
||||
|
||||
git_commit_push
|
||||
|
||||
popd
|
||||
@@ -22,6 +22,7 @@ if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
echo "Snapshots found. Exiting build"
|
||||
find applications/stream-applications-core -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
lines=$(find applications/stream-applications-core -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
@@ -31,9 +32,10 @@ else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find applications/stream-applications-core -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
git checkout -f
|
||||
#git checkout -f
|
||||
|
||||
popd
|
||||
|
||||
@@ -30,6 +30,7 @@ if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
echo "Snapshots found. Exiting build"
|
||||
find applications/stream-applications-core -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
lines=$(find applications/stream-applications-core -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
@@ -40,6 +41,7 @@ else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find applications/stream-applications-core -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
echo "Snapshots found. Exiting build"
|
||||
find functions -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
lines=$(find functions -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
@@ -29,7 +30,10 @@ else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find functions -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#git checkout -f
|
||||
|
||||
popd
|
||||
|
||||
@@ -12,7 +12,7 @@ VERSION=$1
|
||||
function git_commit_push {
|
||||
echo "in git commit"
|
||||
git commit -am"Functions: Release - $VERSION"
|
||||
git push upstream master
|
||||
git push origin master && git push upstream master
|
||||
}
|
||||
|
||||
pushd ../..
|
||||
@@ -29,6 +29,7 @@ if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
echo "Snapshots found. Exiting build"
|
||||
find functions -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
lines=$(find functions -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
@@ -39,6 +40,7 @@ else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find functions -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Please specify the release and core parent versions"
|
||||
exit
|
||||
fi
|
||||
|
||||
pushd ../..
|
||||
|
||||
VERSION=$1
|
||||
./mvnw -f applications/processor versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false -DupdateMatchingVersions=false
|
||||
./mvnw -f applications/processor versions:update-parent -DparentVersion=$2 -Pspring -DgenerateBackupPoms=false
|
||||
|
||||
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
lines=$(find applications/processor -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Snapshots found. Exiting build"
|
||||
find applications/processor -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
else
|
||||
lines=$(find applications/processor -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find applications/processor -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
fi
|
||||
|
||||
popd
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Please specify the release and core parent versions"
|
||||
exit
|
||||
fi
|
||||
|
||||
VERSION=$1
|
||||
|
||||
function git_commit_push {
|
||||
echo "in git commit"
|
||||
git commit -am"Processor Applications: Release - $VERSION"
|
||||
git push origin master && git push upstream master
|
||||
}
|
||||
|
||||
pushd ../..
|
||||
|
||||
./mvnw -f applications/processor versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false -DupdateMatchingVersions=false
|
||||
./mvnw -f applications/processor versions:update-parent -DparentVersion=$2 -Pspring -DgenerateBackupPoms=false
|
||||
|
||||
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
lines=$(find applications/processor -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
git_commit_push
|
||||
else
|
||||
echo "Snapshots found. Exiting build"
|
||||
find applications/processor -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
else
|
||||
lines=$(find applications/processor -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
git_commit_push
|
||||
else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find applications/processor -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
fi
|
||||
|
||||
popd
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Please specify the release and core parent versions"
|
||||
exit
|
||||
fi
|
||||
|
||||
pushd ../..
|
||||
|
||||
VERSION=$1
|
||||
./mvnw -f applications/sink versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false -DupdateMatchingVersions=false
|
||||
./mvnw -f applications/sink versions:update-parent -DparentVersion=$2 -Pspring -DgenerateBackupPoms=false
|
||||
|
||||
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
lines=$(find applications/sink -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Snapshots found. Exiting build"
|
||||
find applications/sink -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
else
|
||||
lines=$(find applications/sink -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find applications/sink -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
fi
|
||||
|
||||
popd
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Please specify the release and core parent versions"
|
||||
exit
|
||||
fi
|
||||
|
||||
VERSION=$1
|
||||
|
||||
function git_commit_push {
|
||||
echo "in git commit"
|
||||
git commit -am"Sink Applications: Release - $VERSION"
|
||||
git push origin master && git push upstream master
|
||||
}
|
||||
|
||||
pushd ../..
|
||||
|
||||
./mvnw -f applications/sink versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false -DupdateMatchingVersions=false
|
||||
./mvnw -f applications/sink versions:update-parent -DparentVersion=$2 -Pspring -DgenerateBackupPoms=false
|
||||
|
||||
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
lines=$(find applications/sink -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
git_commit_push
|
||||
else
|
||||
echo "Snapshots found. Exiting build"
|
||||
find applications/sink -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
else
|
||||
lines=$(find applications/sink -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
git_commit_push
|
||||
else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find applications/sink -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
fi
|
||||
|
||||
popd
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Please specify the release and core parent versions"
|
||||
exit
|
||||
fi
|
||||
|
||||
pushd ../..
|
||||
|
||||
VERSION=$1
|
||||
./mvnw -f applications/source versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false -DupdateMatchingVersions=false
|
||||
./mvnw -f applications/source versions:update-parent -DparentVersion=$2 -Pspring -DgenerateBackupPoms=false
|
||||
|
||||
cd applications/source
|
||||
find . -name "apps" -type d -exec rm -r "{}" \;
|
||||
cd -
|
||||
|
||||
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
lines=$(find applications/source -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Snapshots found. Exiting build"
|
||||
find applications/source -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
else
|
||||
lines=$(find applications/source -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find applications/source -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
fi
|
||||
|
||||
popd
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Please specify the release and core parent versions"
|
||||
exit
|
||||
fi
|
||||
|
||||
VERSION=$1
|
||||
|
||||
function git_commit_push {
|
||||
echo "in git commit"
|
||||
git commit -am"Source Applications: Release - $VERSION"
|
||||
git push origin master && git push upstream master
|
||||
}
|
||||
|
||||
pushd ../..
|
||||
|
||||
./mvnw -f applications/source versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false -DupdateMatchingVersions=false
|
||||
./mvnw -f applications/source versions:update-parent -DparentVersion=$2 -Pspring -DgenerateBackupPoms=false
|
||||
|
||||
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
|
||||
lines=$(find applications/source -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
git_commit_push
|
||||
else
|
||||
echo "Snapshots found. Exiting build"
|
||||
find applications/source -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
else
|
||||
lines=$(find applications/source -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l)
|
||||
if [ $lines -eq 0 ]; then
|
||||
echo "All good"
|
||||
git_commit_push
|
||||
else
|
||||
echo "Non Release versions found. Exiting build"
|
||||
find applications/source -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex
|
||||
git checkout -f
|
||||
fi
|
||||
fi
|
||||
|
||||
popd
|
||||
@@ -83,12 +83,15 @@ cd ../..
|
||||
|
||||
popd
|
||||
|
||||
echo "in git commit"
|
||||
echo "Committing and pushing the changes."
|
||||
|
||||
COMMIT_MSG="Next version updates
|
||||
|
||||
Functions: $FUNCTIONS_NEXT
|
||||
Core Apps: $CORE_NEXT
|
||||
Apps: $APPS_NEXT
|
||||
Aggregate Next:$AGGREGATOR_NEXT"
|
||||
|
||||
git commit -am"$COMMIT_MSG"
|
||||
git push origin master && git push upstream master
|
||||
|
||||
|
||||
Reference in New Issue
Block a user