fix model
This commit is contained in:
@@ -22,7 +22,7 @@ ENTITY_PKG=de.infinimotion.bean
|
|||||||
ProjectVariable.MAVEN_ARTIFACT_ID=model
|
ProjectVariable.MAVEN_ARTIFACT_ID=model
|
||||||
ProjectVariable.MAVEN_GROUP_ID=de.infinimotion
|
ProjectVariable.MAVEN_GROUP_ID=de.infinimotion
|
||||||
ProjectVariable.PROJECT_NAME=infinimodel
|
ProjectVariable.PROJECT_NAME=infinimodel
|
||||||
ProjectVariable.PROJECT_VERSION=0.0.0
|
ProjectVariable.PROJECT_VERSION=0.0.3
|
||||||
ProjectVariable.REST_SERVER_PORT=3000
|
ProjectVariable.REST_SERVER_PORT=3000
|
||||||
ProjectVariable.REST_API_ROOT=/api/v1
|
ProjectVariable.REST_API_ROOT=/api/v1
|
||||||
ProjectVariable.REST_URL_ROOT=http://localhost:3000
|
ProjectVariable.REST_URL_ROOT=http://localhost:3000
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Created on $now.date ( $now.time )
|
* Created on $now.date ( $now.time )
|
||||||
* Generated by $generator.name ( version $generator.version )
|
* Generated by $generator.name ( version $generator.version )
|
||||||
*/
|
*/
|
||||||
package ${target.javaPackageFromFolder(${SRC})};
|
package ${target.javaPackageFromFolder("backend/${SRC}")};
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|||||||
@@ -30,4 +30,12 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>gitea</id>
|
||||||
|
<name>InfiniMotion Apache Maven Packages</name>
|
||||||
|
<url>https://git.chequeo.de/api/packages/infinimotion/maven</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@InfiniMotion:registry=https://npm.pkg.github.com
|
@infinimotion:registry=https://git.chequeo.de/api/packages/infinimotion/npm/
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#set( $env.language = 'TypeScript' )
|
|
||||||
export default interface $entity.name {
|
|
||||||
#foreach( $attribute in $entity.attributes )
|
|
||||||
${attribute.name}: ${attribute.type};
|
|
||||||
#end
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#set( $env.language = 'TypeScript' )
|
||||||
|
#foreach( $link in $entity.links )
|
||||||
|
import $link.fieldType from "./${link.fieldType}";
|
||||||
|
#end
|
||||||
|
|
||||||
|
export default interface $entity.name {
|
||||||
|
#foreach( $attribute in $entity.attributes )
|
||||||
|
${attribute.name}: ${attribute.type};
|
||||||
|
#end
|
||||||
|
#foreach( $link in $entity.links )
|
||||||
|
${link.fieldName}: ${link.fieldType};
|
||||||
|
#end
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@InfiniMotion/model-frontend",
|
"name": "@infinimotion/model-frontend",
|
||||||
"version": "0.0.0",
|
"version": "$fn.get("PROJECT_VERSION","0.0.0")",
|
||||||
"description": "InfiniMotion Model for Frontend",
|
"description": "InfiniMotion Model for Frontend",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
@@ -22,6 +22,6 @@
|
|||||||
},
|
},
|
||||||
"repository": "https://github.com/InfiniMotion/model.git",
|
"repository": "https://github.com/InfiniMotion/model.git",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://npm.pkg.github.com"
|
"registry": "https://git.chequeo.de/api/packages/infinimotion/npm/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#parse("persistence/include/init_var_entity.vm")
|
#parse("persistence/include/init_var_entity.vm")
|
||||||
#parse("persistence/include/java_header.vm")
|
#parse("persistence/include/java_header.vm")
|
||||||
##--------------------------------------------------------------------------------------------------------
|
##--------------------------------------------------------------------------------------------------------
|
||||||
package ${target.javaPackageFromFolder($SRC)};
|
package ${target.javaPackageFromFolder("persistence/${SRC}")};
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
## #set($jpa.oneToManyFetchType = "EAGER" )
|
## #set($jpa.oneToManyFetchType = "EAGER" )
|
||||||
## #set($jpa.manyToManyFetchType = "EAGER" )
|
## #set($jpa.manyToManyFetchType = "EAGER" )
|
||||||
##---------------------------------------------------------------------------------------
|
##---------------------------------------------------------------------------------------
|
||||||
package ${target.javaPackageFromFolder(${SRC})};
|
package ${target.javaPackageFromFolder("persistence/${SRC}")};
|
||||||
## IF ENTITY HAS A COMPOSITE PRIMARY KEY => GENERATE AN 'ID CLASS' FOR THIS PRIMARY KEY
|
## IF ENTITY HAS A COMPOSITE PRIMARY KEY => GENERATE AN 'ID CLASS' FOR THIS PRIMARY KEY
|
||||||
#if ( $entity.hasCompositePrimaryKey() )
|
#if ( $entity.hasCompositePrimaryKey() )
|
||||||
$generator.generate($target.entityName , "${jpaEntityIdClass}.java", $target.folder, "persistence/persistence_entity_id_java.vm" )
|
$generator.generate($target.entityName , "${jpaEntityIdClass}.java", $target.folder, "persistence/persistence_entity_id_java.vm" )
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>$fn.get("MAVEN_GROUP_ID","to.be.defined")</groupId>
|
<groupId>$fn.get("MAVEN_GROUP_ID","to.be.defined")</groupId>
|
||||||
<artifactId>$fn.get("MAVEN_ARTIFACT_ID","to.be.defined")-persistence</artifactId>
|
<artifactId>$fn.get("MAVEN_ARTIFACT_ID","to.be.defined")-persistence</artifactId>
|
||||||
<version>$fn.get("PROJECT_VERSION","1.0.0")</version>
|
<version>$fn.get("PROJECT_VERSION","0.0.0")</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -38,4 +38,12 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>gitea</id>
|
||||||
|
<name>InfiniMotion Apache Maven Packages</name>
|
||||||
|
<url>https://git.chequeo.de/api/packages/infinimotion/maven</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ package.json ; package.json ; frontend
|
|||||||
tsconfig.json ; tsconfig.json ; frontend ; frontend/tsconfig_json.vm ; 1
|
tsconfig.json ; tsconfig.json ; frontend ; frontend/tsconfig_json.vm ; 1
|
||||||
tsup.config.ts ; tsup.config.ts ; frontend ; frontend/tsup.config_ts.vm ; 1
|
tsup.config.ts ; tsup.config.ts ; frontend ; frontend/tsup.config_ts.vm ; 1
|
||||||
index.ts ; index.ts ; frontend ; frontend/index_ts.vm ; 1
|
index.ts ; index.ts ; frontend ; frontend/index_ts.vm ; 1
|
||||||
TypeScript Models ; ${BEANNAME}.ts ; frontend ; frontend/Xmodel_ts.vm
|
TypeScript Models ; ${BEANNAME}.ts ; frontend ; frontend/frontend_entity_ts.vm
|
||||||
|
|
||||||
### Backend ###
|
### Backend ###
|
||||||
Java Backend Models ; ${BEANNAME}.java ; backend/${SRC}/${ROOT_PKG}/backend ; backend/backend_entity_java.vm
|
Java Backend Models ; ${BEANNAME}.java ; backend/${SRC}/${ROOT_PKG}/backend ; backend/backend_entity_java.vm
|
||||||
|
|||||||
26
build-all.sh
Normal file
26
build-all.sh
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
latest=$(npm view @infinimotion/model-frontend --registry https://git.chequeo.de/api/packages/infinimotion/npm/ | grep latest)
|
||||||
|
latest=($latest)
|
||||||
|
version=${latest[1]}
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
java -jar /c/Program\ Files/telosys-cli/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
|
||||||
3
input-telosys-cli.txt
Normal file
3
input-telosys-cli.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
gen * * -y
|
||||||
|
q
|
||||||
|
|
||||||
Reference in New Issue
Block a user