diff --git a/etc/release-tools/aggregate-upgrade-dryrun.sh b/etc/release-tools/aggregate-upgrade-dryrun.sh new file mode 100755 index 00000000..a59e2095 --- /dev/null +++ b/etc/release-tools/aggregate-upgrade-dryrun.sh @@ -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 diff --git a/etc/release-tools/aggregate-upgrade.sh b/etc/release-tools/aggregate-upgrade.sh new file mode 100755 index 00000000..1d1782d3 --- /dev/null +++ b/etc/release-tools/aggregate-upgrade.sh @@ -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 diff --git a/etc/release-tools/core-upgrade-dryrun.sh b/etc/release-tools/core-upgrade-dryrun.sh new file mode 100755 index 00000000..97752032 --- /dev/null +++ b/etc/release-tools/core-upgrade-dryrun.sh @@ -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/.*/'"$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 diff --git a/etc/release-tools/core-upgrade.sh b/etc/release-tools/core-upgrade.sh new file mode 100755 index 00000000..391c468b --- /dev/null +++ b/etc/release-tools/core-upgrade.sh @@ -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/.*/'"$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 diff --git a/etc/release-tools/functions-upgrade-dryrun.sh b/etc/release-tools/functions-upgrade-dryrun.sh new file mode 100755 index 00000000..011db6cc --- /dev/null +++ b/etc/release-tools/functions-upgrade-dryrun.sh @@ -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 diff --git a/etc/release-tools/functions-upgrade.sh b/etc/release-tools/functions-upgrade.sh new file mode 100755 index 00000000..d873ee46 --- /dev/null +++ b/etc/release-tools/functions-upgrade.sh @@ -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 diff --git a/etc/release-tools/processor-upgrade-dryrun.sh b/etc/release-tools/processor-upgrade-dryrun.sh new file mode 100755 index 00000000..326a348a --- /dev/null +++ b/etc/release-tools/processor-upgrade-dryrun.sh @@ -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 diff --git a/etc/release-tools/processor-upgrade.sh b/etc/release-tools/processor-upgrade.sh new file mode 100755 index 00000000..2cabb731 --- /dev/null +++ b/etc/release-tools/processor-upgrade.sh @@ -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 diff --git a/etc/release-tools/sink-upgrade-dryrun.sh b/etc/release-tools/sink-upgrade-dryrun.sh new file mode 100755 index 00000000..482f6f97 --- /dev/null +++ b/etc/release-tools/sink-upgrade-dryrun.sh @@ -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 diff --git a/etc/release-tools/sink-upgrade.sh b/etc/release-tools/sink-upgrade.sh new file mode 100755 index 00000000..ad91f0af --- /dev/null +++ b/etc/release-tools/sink-upgrade.sh @@ -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 diff --git a/etc/release-tools/source-upgrade-dryrun.sh b/etc/release-tools/source-upgrade-dryrun.sh new file mode 100755 index 00000000..4ee3ab44 --- /dev/null +++ b/etc/release-tools/source-upgrade-dryrun.sh @@ -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 diff --git a/etc/release-tools/source-upgrade.sh b/etc/release-tools/source-upgrade.sh new file mode 100755 index 00000000..46888d6b --- /dev/null +++ b/etc/release-tools/source-upgrade.sh @@ -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