Release related tools

This commit is contained in:
Soby Chacko
2020-06-19 16:35:26 -04:00
parent cffbe2fa56
commit d962ba65ea
12 changed files with 460 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Please specify the release and core parent versions"
exit
fi
pushd ../..
VERSION=$1
./mvnw -f applications/stream-applications-build versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
./mvnw -f applications/stream-applications-build versions:update-parent -DparentVersion=$2 -Pspring -DgenerateBackupPoms=false
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
lines=$(find applications/stream-applications-build -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/stream-applications-build -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
git checkout -f
fi
else
lines=$(find applications/stream-applications-build -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/stream-applications-build -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

View File

@@ -0,0 +1,42 @@
#!/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"Aggregating docs/descriptors : Release - $1"
git push origin master
}
pushd ../..
VERSION=$1
./mvnw -f applications/stream-applications-build versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
./mvnw -f applications/stream-applications-build versions:update-parent -DparentVersion=$2 -Pspring -DgenerateBackupPoms=false
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
lines=$(find applications/stream-applications-build -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/stream-applications-build -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
git checkout -f
fi
else
lines=$(find applications/stream-applications-build -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/stream-applications-build -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

View File

@@ -0,0 +1,35 @@
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Please specify the release version and java-functions.version property"
exit
fi
pushd ../..
VERSION=$1
./mvnw -f applications/stream-applications-core versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
sed -i '' 's/<java-functions.version>.*/<java-functions.version>'"$2"'<\/java-functions.version>/g' pom.xml
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
lines=$(find applications/stream-applications-core -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/stream-applications-core -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
git checkout -f
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)
if [ $lines -eq 0 ]; then
echo "All good"
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
fi
fi
popd

View File

@@ -0,0 +1,43 @@
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Please specify the release version and java-functions.version property"
exit
fi
function git_commit_push {
echo "in git commit"
git commit -am"Stream Applications Core: Release - $1"
git push origin master
}
pushd ../..
VERSION=$1
./mvnw -f applications/stream-applications-core versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
sed -i '' 's/<java-functions.version>.*/<java-functions.version>'"$2"'<\/java-functions.version>/g' pom.xml
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
lines=$(find applications/stream-applications-core -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/stream-applications-core -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
git checkout -f
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)
if [ $lines -eq 0 ]; then
echo "All good"
git_commit_push
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
fi
fi
popd

View File

@@ -0,0 +1,35 @@
#!/bin/bash
# The script takes one argument - release version
if [ "$#" -ne 1 ]; then
echo "Please specify the release version"
exit
fi
pushd ../..
VERSION=$1
./mvnw -f functions versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
lines=$(find functions -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 functions -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
git checkout -f
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)
if [ $lines -eq 0 ]; then
echo "All good"
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
fi
fi
popd

View File

@@ -0,0 +1,43 @@
#!/bin/bash
# The script takes one argument - release version
if [ "$#" -ne 1 ]; then
echo "Please specify the release version"
exit
fi
function git_commit_push {
echo "in git commit"
git commit -am"Functions: Release - $1"
git push origin master
}
pushd ../..
VERSION=$1
./mvnw -f functions versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
if [[ $VERSION =~ M[0-9]|RC[0-9] ]]; then
lines=$(find functions -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 functions -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex
git checkout -f
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)
if [ $lines -eq 0 ]; then
echo "All good"
git_commit_push
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
fi
fi
popd

View File

@@ -0,0 +1,34 @@
#!/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
./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

View File

@@ -0,0 +1,42 @@
#!/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"Processor Applications: Release - $1"
git push origin master
}
pushd ../..
VERSION=$1
./mvnw -f applications/processor versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=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

View File

@@ -0,0 +1,34 @@
#!/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
./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

View File

@@ -0,0 +1,42 @@
#!/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"Sink Applications: Release - $1"
git push origin master
}
pushd ../..
VERSION=$1
./mvnw -f applications/sink versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=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

View File

@@ -0,0 +1,34 @@
#!/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
./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"
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

View File

@@ -0,0 +1,42 @@
#!/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 - $1"
git push origin master
}
pushd ../..
VERSION=$1
./mvnw -f applications/source versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=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