diff --git a/baton-maven-plugin/pom.xml b/baton-maven-plugin/pom.xml
index 771d932..0345af2 100644
--- a/baton-maven-plugin/pom.xml
+++ b/baton-maven-plugin/pom.xml
@@ -4,7 +4,7 @@
org.technologybrewery.baton
baton
- 0.1.0-SNAPSHOT
+ 0.1.0
Baton::Maven Plugin
diff --git a/examples/example-migration-configuration/pom.xml b/examples/example-migration-configuration/pom.xml
index 373d7fc..53c929c 100644
--- a/examples/example-migration-configuration/pom.xml
+++ b/examples/example-migration-configuration/pom.xml
@@ -4,7 +4,7 @@
org.technologybrewery.baton
examples
- 0.1.0-SNAPSHOT
+ 0.1.0
Baton::Examples::Configuration
diff --git a/examples/example-projects/pom.xml b/examples/example-projects/pom.xml
index 3ddf139..55cac96 100644
--- a/examples/example-projects/pom.xml
+++ b/examples/example-projects/pom.xml
@@ -4,7 +4,7 @@
org.technologybrewery.baton
examples
- 0.1.0-SNAPSHOT
+ 0.1.0
Baton::Examples::Projects
diff --git a/examples/example-projects/toml-file-update/pom.xml b/examples/example-projects/toml-file-update/pom.xml
index 939918c..28ab9fd 100644
--- a/examples/example-projects/toml-file-update/pom.xml
+++ b/examples/example-projects/toml-file-update/pom.xml
@@ -4,7 +4,7 @@
org.technologybrewery.baton
example-projects
- 0.1.0-SNAPSHOT
+ 0.1.0
Baton::Examples::TOML File Update
diff --git a/examples/example-projects/toml-file-update/pyproject.toml b/examples/example-projects/toml-file-update/pyproject.toml
index accc606..b6fbf89 100644
--- a/examples/example-projects/toml-file-update/pyproject.toml
+++ b/examples/example-projects/toml-file-update/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "toml-file-update"
-version = "0.1.0.dev"
+version = "0.1.0"
description = ""
authors = ["Ryan Ashcraft "]
readme = "README.md"
@@ -11,6 +11,10 @@ python = "^3.11"
[tool.poetry.group.monorepo.dependencies]
+
+[tool.poetry.group.dev.dependencies]
+behave = "^1.2.6"
+
[tool.poetry.dev-dependencies]
black = "^23.10.1"
diff --git a/examples/pom.xml b/examples/pom.xml
index 0845823..e50e013 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -4,7 +4,7 @@
org.technologybrewery.baton
baton
- 0.1.0-SNAPSHOT
+ 0.1.0
Baton::Examples
diff --git a/pom.xml b/pom.xml
index c1fffdc..5f7a624 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
org.technologybrewery.baton
- 0.1.0-SNAPSHOT
+ 0.1.0
baton
pom
diff --git a/release-baton.sh b/release-baton.sh
new file mode 100755
index 0000000..1aa0149
--- /dev/null
+++ b/release-baton.sh
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+#This script requires two input parameter, 1)target release version 2)next development version.
+#To run the script, enter a command like this: ./release-baton.sh
+
+#After the script is executed, navigate to github to create a PR to merge your release branch
+#and validate that the released version of baton-maven-plugin may be found in Maven Central
+
+echo "////////////////////////////////////////////"
+echo "//"
+echo "// Use this script to run a release for Baton"
+echo "//"
+echo "////////////////////////////////////////////"
+
+echo "//////////// Check out a release branch ////////////"
+git checkout -b $1-release
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Process failed! Unable to check out release branch!'; exit 1
+fi
+
+echo "/////////// Check there are no uncommitted local changes ///////////"
+mvn scm:check-local-modification
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Process failed! Uncommitted local changes detected!'; exit 1
+fi
+
+echo "/////////// Update POM versions to the target release version ///////////"
+mvn versions:set -DnewVersion=$1 -DgenerateBackupPoms=false
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Process failed! Unable to update POM versions to the target release version'; exit 1
+fi
+
+echo "/////////// Rebuild Baton modules (1) ///////////"
+mvn clean install -Pbootstrap -Dmaven.build.cache.enabled=false && mvn clean install -pl :example-migration-configuration -Dmaven.build.cache.enabled=false && mvn clean initialize -Dmaven.build.cache.enabled=false
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Rebuilding Baton (1) failed!'; exit 1
+fi
+
+echo "/////////// Commit all changes that reflect the target release version and create a tag ///////////"
+mvn scm:checkin -Dmessage=":memo: Prepare release baton-$1"
+mvn scm:tag -Dtag=baton-$1
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Process failed! Unable to commit changes and create a tag!'; exit 1
+fi
+
+echo "/////////// Deploy Baton to Maven Central ///////////"
+mvn deploy -P ossrh-release -Dmaven.build.cache.enabled=false
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Process failed! Unable to deploy Baton to Maven Central!'; exit 1
+fi
+
+echo "/////////// Update POM versions to the next development version ///////////"
+mvn versions:set -DnewVersion=$2 -DgenerateBackupPoms=false
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Process failed! Unable to update POM versions to the next development version!'; exit 1
+fi
+
+echo "/////////// Rebuild Baton modules (2) ///////////"
+mvn clean install -Pbootstrap && mvn clean install -pl :example-migration-configuration && mvn clean initialize
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Rebuilding Baton (2) failed!'; exit 1
+fi
+
+echo "/////////// Commit all changes that reflect the next development iteration///////////"
+mvn scm:checkin -Dmessage="Prepare for next development iteration"
+
+if [[ "$?" -ne 0 ]] ; then
+ echo 'Process failed! Unable to commit changes for the next development iteration!'; exit 1
+fi
\ No newline at end of file