#!/bin/sh if [ "$#" -ne 1 ]; then echo "Aufruf: ozg-release-erstellen.sh JA" echo "Als Parameter bitte 'JA' eintragen zur Sicherheit" exit 1 fi ## alle -SNAPSHOT in pom.xmls entfernen SED_PARAMS="-i" if [[ "$OSTYPE" =~ ^darwin ]]; then SED_PARAMS="$SED_PARAMS '' -e" fi find . -name pom.xml -exec sed $SED_PARAMS 's/-SNAPSHOT//g' {} + ## release version auslesen NEWVERSION=$(xmlstarlet sel -N w="http://maven.apache.org/POM/4.0.0" -t -v '//w:project/w:version' -n pom.xml) echo echo "NEXT STEPS:" echo "***********" echo "Änderungen prüfen" echo "git commit -a -m 'release version "$NEWVERSION"'" echo "git push" echo "git tag "$NEWVERSION echo "git push --tags"