Skip to content
Snippets Groups Projects
Commit 84ebaa8e authored by Jan Zickermann's avatar Jan Zickermann
Browse files

Merge branch 'main' into OZG-4097-Senden-und-Empfangen-von-Anhängen

parents 939c7481 57950e92
No related branches found
No related tags found
1 merge request!15Ozg 4097 senden und empfangen von anhängen
Pipeline #1749 failed
out/
# ---> Maven # ---> Maven
target/ target/
pom.xml.tag pom.xml.tag
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<groupId>de.ozgcloud.osiv2</groupId> <groupId>de.ozgcloud.osiv2</groupId>
<artifactId>osiv2-postfach</artifactId> <artifactId>osiv2-postfach</artifactId>
<version>0.2.0-SNAPSHOT</version> <version>0.3.0-SNAPSHOT</version>
<name>OZG-Cloud-OSIv2-Postfach</name> <name>OZG-Cloud-OSIv2-Postfach</name>
<description>OSIv2-Postfach-Anbindung für OZG-Cloud-Nachrichten</description> <description>OSIv2-Postfach-Anbindung für OZG-Cloud-Nachrichten</description>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
set -e set -e
cd "$(dirname "${BASH_SOURCE[0]}")" cd "$(dirname "${BASH_SOURCE[0]}")"
pushd .. pushd ..
...@@ -11,12 +10,9 @@ echo "OSIV2_POSTFACH_VERSION: $OSIV2_POSTFACH_VERSION" ...@@ -11,12 +10,9 @@ echo "OSIV2_POSTFACH_VERSION: $OSIV2_POSTFACH_VERSION"
mvn -DskipTests=true clean install mvn -DskipTests=true clean install
popd popd
# Building in temp directory since maven build fails in this directory PROJECT_DIRECTORY=../../
BUILD_DIR=$(mktemp -d) pushd "$PROJECT_DIRECTORY"
trap "rm -rf '$BUILD_DIR'" EXIT
cd "$BUILD_DIR"
git clone --depth 1 --branch OZG-4094-OSI2-Postfach-Facade https://code.schleswig-holstein.de/ozg-cloud/app/nachrichten-manager.git
pushd nachrichten-manager pushd nachrichten-manager
NACHRICHTEN_MANAGER_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) NACHRICHTEN_MANAGER_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "NACHRICHTEN_MANAGER_VERSION: $NACHRICHTEN_MANAGER_VERSION" echo "NACHRICHTEN_MANAGER_VERSION: $NACHRICHTEN_MANAGER_VERSION"
...@@ -26,7 +22,6 @@ sed -i \ ...@@ -26,7 +22,6 @@ sed -i \
mvn -DskipTests=true clean install mvn -DskipTests=true clean install
popd popd
git clone --depth 1 --single-branch https://code.schleswig-holstein.de/ozg-cloud/app/vorgang-manager.git
pushd vorgang-manager pushd vorgang-manager
sed -i \ sed -i \
's|<nachrichten-manager.version>.*</nachrichten-manager.version>|<nachrichten-manager.version>'"$NACHRICHTEN_MANAGER_VERSION"'</nachrichten-manager.version>|g' \ 's|<nachrichten-manager.version>.*</nachrichten-manager.version>|<nachrichten-manager.version>'"$NACHRICHTEN_MANAGER_VERSION"'</nachrichten-manager.version>|g' \
......
#!/bin/bash
set -e
# Change directory to the root of the project
cd "$(dirname "${BASH_SOURCE[0]}")/../"
if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]
then
echo "[ERROR] Not on main branch"
exit 1
fi
if [ -n "$(git status --porcelain)" ]
then
echo "[ERROR] Working directory is not clean"
exit 1
fi
MAVEN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ ! "$MAVEN_VERSION" =~ -SNAPSHOT$ ]]
then
echo "[ERROR] Version should end with -SNAPSHOT"
exit 1
fi
prompt_yes_no() {
read -p "$1 (y/n) " -n 1 -r
echo
[[ $REPLY =~ ^[Yy]$ ]] || exit 1
}
NUMERIC_VERSION=$(echo "$MAVEN_VERSION" | cut -d'-' -f1)
MAJOR=$(echo "$NUMERIC_VERSION" | cut -d '.' -f 1)
MINOR=$(echo "$NUMERIC_VERSION" | cut -d '.' -f 2)
PATCH=$(echo "$NUMERIC_VERSION" | cut -d '.' -f 3)
CURRENT_VERSION="$MAJOR.$MINOR.$PATCH"
NEW_VERSION="$MAJOR.$((MINOR + 1)).0"
NEW_SNAPSHOT_VERSION="$NEW_VERSION-SNAPSHOT"
prompt_yes_no "Tag $CURRENT_VERSION and bump version from $MAVEN_VERSION to $NEW_SNAPSHOT_VERSION?"
git tag -m "Release version $CURRENT_VERSION" "$CURRENT_VERSION"
mvn versions:set -DnewVersion="$NEW_SNAPSHOT_VERSION" -DgenerateBackupPoms=false
git add -u
git commit -m "Start development of $NEW_VERSION"
prompt_yes_no "git push origin main $CURRENT_VERSION?"
git push origin main "$CURRENT_VERSION"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment