Skip to content
Snippets Groups Projects
Commit 8f10b92a authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-6751-InfoManager-code-cleanup' (#35) from...

Merge pull request 'OZG-6751-InfoManager-code-cleanup' (#35) from OZG-6751-InfoManager-code-cleanup into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-app/info-manager/pulls/35


Reviewed-by: default avatarOZGCloud <ozgcloud@mgm-tp.com>
parents 20ab96bc 89d96bd0
No related branches found
No related tags found
No related merge requests found
......@@ -38,15 +38,16 @@ import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension;
import de.ozgcloud.info.NachrichtEventTestFactory;
import de.ozgcloud.info.common.NachrichtEvent;
@ExtendWith(MockitoExtension.class)
class NachrichtenServiceTest {
@Spy
@InjectMocks
private NachrichtenService service;
private NachrichtService service;
@Mock
private NachrichtenRepository repository;
private NachrichtRepository repository;
@Nested
class TestAddingNewNachrichtEvent {
......
org.mockito.junit.jupiter.MockitoExtension
\ No newline at end of file
mock-maker-inline
\ No newline at end of file
VERSION=1.2.0
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Aufruf: 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)
git checkout dev
git pull
git checkout release
......@@ -6,12 +24,24 @@ git pull
git merge dev
# Die Version von `"X.X.X-SNAPSHOT"` auf `"X.X.X"` ändern
find . -name pom.xml | xargs perl -i -p -e"s/${VERSION}-SNAPSHOT/$VERSION/g"
find . -name pom.xml | xargs perl -i -p -e"s/${NEWVERSION}-SNAPSHOT/$NEWVERSION/g"
git commit -am "release version $VERSION"
git push
git tag $VERSION
git push origin $VERSION
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"
echo "git checkout dev"
echo "git merge release"
git checkout dev
git merge release
# to do by script
#git commit -am "release version $NEWVERSION"
#git push
#git tag $VERSION
#git push origin $VERSION
#git checkout dev
#git merge release
NEXTVERSION=X.X+1.X
# Die Version im dev branch von `"X.X.X"` auf `"X.X+1.X-SNAPSHOT"` ändern
find . -name pom.xml | xargs perl -i -p -e"s/$VERSION/${NEXTVERSION}-SNAPSHOT/g"
#!/bin/bash
git commit -am "start development $NEXTVERSION"
git push
#set -x
if [ "$#" -ne 1 ]; then
echo "Aufruf: release-startdev.sh NEWVERSION"
exit 1
fi
NEWVERSION=$1
echo
# pom.xml:main -> project.version setzen
# projectname/pom.xml:parent -> project.parent.version setzen
# projectname/pom.xml:parent,main -> project.parent.version und project.version setzen
#
PROJECTS="pom.xml:main
server/pom.xml:main
"
for PROJECT in $PROJECTS;
do
POMFILE=$(echo $PROJECT | cut -d':' -f1)
ACTIONS=$(echo $PROJECT | cut -d':' -f2)
## Auf SNAPSHOT Versionen testen
if fgrep -q "SNAPSHOT" $POMFILE; then
RED='\033[0;31m'
NC='\033[0m'
echo "${RED}ERROR: Datei "$POMFILE" enthält noch SNAPSHOT Versionen, das sollte hier nicht passieren.${NC}"
exit 1
fi
echo $ACTIONS
## Versionen setzen
if [[ $ACTIONS == "main" ]] ; then
xmlstarlet ed --pf -L -N w="http://maven.apache.org/POM/4.0.0" -u '//w:project/w:version' -v $NEWVERSION $POMFILE
fi
if [[ $ACTIONS == "parent" ]]; then
xmlstarlet ed --pf -L -N w="http://maven.apache.org/POM/4.0.0" -u '//w:project/w:parent/w:version' -v $NEWVERSION $POMFILE
fi
done
echo
echo "NEXT STEPS:"
echo "***********"
echo "Änderungen prüfen"
echo "git commit -a -m 'start development "$NEWVERSION"'"
echo "git push"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment