Skip to content

Commit

Permalink
[release] Testing alpha release using automated script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sathish Kumar authored and Sathish Kumar committed Aug 1, 2024
1 parent 3f2fc86 commit cead70e
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/cleanup_cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -ev

find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT" | xargs -r -l rm -rf
16 changes: 16 additions & 0 deletions scripts/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
echo "=========================== Starting Init Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"

# Maven Setup
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf

# Docker Logins
echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin
echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io

popd
set +vex
echo "=========================== Finishing Init Script =========================="
22 changes: 22 additions & 0 deletions scripts/maven_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
echo "=========================== Starting Release Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"

# Use full history for release
git checkout -B "${BRANCH_NAME}"

# Run the release plugin - with "[skip ci]" in the release commit message
mvn -B \
"-Darguments=-DskipTests -Dbuild-number=${BUILD_NUMBER}" \
release:clean release:prepare release:perform \
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
-Dusername="${GIT_USERNAME}" \
-Dpassword="${GIT_PASSWORD}" \
-Prelease

popd
set +vex
echo "=========================== Finishing Release Script =========================="

23 changes: 23 additions & 0 deletions scripts/verify_release_tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
echo "=========================== Starting Verify Release Tag Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"

#
# Check that the version to be released does not already have a git tag.
#

POM_VERSION=$(mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout)
printf "POM version: %s\n" "${POM_VERSION}"

TAG="${POM_VERSION%-SNAPSHOT}"

if git rev-parse "${TAG}^{tag}" &>/dev/null ; then
echo "The next tag \"${TAG}\" already exists in the git project"
exit 1
fi

popd
set +vex
echo "=========================== Finishing Verify Release Tag Script =========================="

0 comments on commit cead70e

Please sign in to comment.