# Release procedure.
This uses the maven-replease-plugin which has been configured to ONLY modify the local git repo.

## Ensure we have all upstream updates (like patches from Renovate)
git pull

## Ensure all has been committed
git status

## Update the top of the CHANGELOG.md and website frontpage
vim CHANGELOG.md documentation/content/_index.md
git commit -m"docs: Updated CHANGELOG and website before release" CHANGELOG.md documentation/content/_index.md

## Prepare the release: Make releasable version and make tag.
mvn release:prepare

# UNDO Procedure MANUALLY:
# mvn release:rollback    will create an extra commit to rollback the changes in the pom.xml files and remove the tag but NOT everything.
# Using `git log` see how many commits must be removed.
# git reset HEAD~2

# Actually run the release: Effectively mvn deploy towards Sonatype
mvn release:perform

#
# Now check SONATYPE
#

# This now contains the latest released version
RELEASEVERSION=$(cat documentation/layouts/shortcodes/YauaaVersion.md)

git push
git push origin v${RELEASEVERSION}

# Publish the docker image
docker push nielsbasjes/yauaa:${RELEASEVERSION}
docker push nielsbasjes/yauaa:latest

# Upload logstash gem to github.com
# ${project.basedir}/target/checkout/udfs/logstash/logstash-filter/target/logstash-filter-yauaa-x.xx.gem

#######################

# Publishing a SNAPSHOT version
mvn clean deploy -PpackageForRelease -PdeployToSonatype


# Release procedure.
This uses the maven-replease-plugin which has been configured to ONLY modify the local git repo.

## Ensure we have all upstream updates (like patches from Renovate)
git pull

## Ensure all has been committed
git status

## Update the top of the CHANGELOG.md and website frontpage
vim CHANGELOG.md documentation/content/_index.md
git commit -m"docs: Updated CHANGELOG and website before release" CHANGELOG.md documentation/content/_index.md

## Prepare the release: Make releasable version and make tag.
mvn release:prepare

# UNDO Procedure MANUALLY:
# mvn release:rollback    will create an extra commit to rollback the changes in the pom.xml files and remove the tag but NOT everything.
# Using `git log` see how many commits must be removed.
# git reset HEAD~2

# Actually run the release: Effectively mvn deploy towards Sonatype
mvn release:perform

#
# Now check SONATYPE
#

# This now contains the latest released version
RELEASEVERSION=$(cat documentation/layouts/shortcodes/YauaaVersion.md)

git push
git push origin v${RELEASEVERSION}

# Publish the docker image
docker push nielsbasjes/yauaa:${RELEASEVERSION}
docker push nielsbasjes/yauaa:latest

# Upload logstash gem to github.com
# ${project.basedir}/target/checkout/udfs/elastic/logstash/logstash-filter/target/logstash-filter-yauaa-x.x.x.gem

#######################

# Publishing a SNAPSHOT version
mvn clean deploy -PpackageForRelease -PdeployToSonatype


Fix path of the gem to be published
docs: Fix path of the gem to be published
