Files
model/build-all.sh
2025-10-17 16:03:43 +02:00

27 lines
903 B
Bash

#!/bin/bash
version=$(npm view @infinimotion/model-frontend version --registry https://git.infinimotion.de/api/packages/infinimotion/npm/)
major=$(cut -d'.' -f1 <<<"$version")
minor=$(cut -d'.' -f2 <<<"$version")
patch=$(cut -d'.' -f3 <<<"$version")
new_patch=$((patch+1))
new_version=$major.$minor.$new_patch
version_cfg="ProjectVariable\.PROJECT_VERSION=[0-9]*\.[0-9]*\.[0-9]*$"
new_version_cfg="ProjectVariable.PROJECT_VERSION=$new_version"
echo "Changing version..."
sed -i -E -e "s/$version_cfg/$new_version_cfg/g" ./TelosysTools/telosys-tools.cfg
echo "$version -> $new_version"
TELOSYS_HOME=${TELOSYS_HOME:-/c/Program\ Files/telosys-cli}
java -jar "$TELOSYS_HOME/telosys-cli-4.2.0-001.jar" -h . -i input-telosys-cli.txt
(cd frontend && npm install && tsup && npm publish)
(cd backend && mvn package deploy)
(cd persistence && mvn package deploy)
echo "Published new version $new_version"