Generate and publish TS DTO interfaces (#12293)
#11306 generate and publish TS DTO interfaces Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>6.19.x
parent
72065b582f
commit
5ac5e46ee2
1
pom.xml
1
pom.xml
|
|
@ -41,6 +41,7 @@
|
|||
<module>assembly</module>
|
||||
<module>selenium</module>
|
||||
<module>dockerfiles</module>
|
||||
<module>typescript-dto</module>
|
||||
</modules>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:eclipse/che.git</connection>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
index.d.ts
|
||||
target/
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
# Copyright (c) 2018 Red Hat, Inc.
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
# Contributors:
|
||||
# Red Hat, Inc. - initial API and implementation
|
||||
|
||||
###
|
||||
# Builder Image
|
||||
#
|
||||
#FROM maven:3.3-jdk-8 as builder
|
||||
|
||||
#ADD ./dto-pom.xml /generator/pom.xml
|
||||
|
||||
#RUN cd /generator && mvn -U -DskipTests=true -Dfindbugs.skip=true -Dskip-validate-sources install
|
||||
|
||||
###
|
||||
# Publish image
|
||||
#
|
||||
FROM node:6.11.2
|
||||
|
||||
RUN npm i -g yarn@1.9.4
|
||||
|
||||
ADD package.json /che/package.json
|
||||
|
||||
COPY ./index.d.ts /che/index.d.ts
|
||||
|
||||
ARG NPM_AUTH_TOKEN
|
||||
|
||||
ARG CHE_VERSION
|
||||
|
||||
RUN cd /che && yarn publish --registry=https://registry.npmjs.org/ --no-git-tag-version --new-version ${CHE_VERSION}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2012-2017 Red Hat, Inc.
|
||||
This program and the accompanying materials are made
|
||||
available under the terms of the Eclipse Public License 2.0
|
||||
which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
|
||||
SPDX-License-Identifier: EPL-2.0
|
||||
|
||||
Contributors:
|
||||
Red Hat, Inc.- initial API and implementation
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>maven-depmgt-pom</artifactId>
|
||||
<groupId>org.eclipse.che.depmgt</groupId>
|
||||
<version>6.17.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>dts-dto-typescript</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Che TypeScript DTO</name>
|
||||
<properties>
|
||||
<che.version>6.17.0-SNAPSHOT</che.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<name>central public releases</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>ossrh-snapshots</id>
|
||||
<name>central public snapshots</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>codenvy-public-repo</id>
|
||||
<name>ossrh releases</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/releases/</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>ossrh-snapshots</id>
|
||||
<name>ossrh snapshots</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-typescript-dto-maven-plugin</artifactId>
|
||||
<version>${che.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<configuration>
|
||||
<dts>true</dts>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-factory-shared</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project-templates-shared</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-ssh-shared</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-system-shared</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-user-shared</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-workspace-shared</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<inherited>false</inherited>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"name": "@eclipse-che/api",
|
||||
"version": "6.17.0",
|
||||
"description": "Eclipse Che DTO API",
|
||||
"types": "index.d.ts",
|
||||
"license": "EPL-2.0",
|
||||
"files": [
|
||||
"index.d.ts"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2018-2018 Red Hat, Inc.
|
||||
This program and the accompanying materials are made
|
||||
available under the terms of the Eclipse Public License 2.0
|
||||
which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
|
||||
SPDX-License-Identifier: EPL-2.0
|
||||
|
||||
Contributors:
|
||||
Red Hat, Inc. - initial API and implementation
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>che-parent</artifactId>
|
||||
<groupId>org.eclipse.che</groupId>
|
||||
<version>6.17.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>org.eclipse.che.typescript.dto</groupId>
|
||||
<artifactId>che-typescript-dto</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Che TypeScript DTO Generate and Publish</name>
|
||||
<inceptionYear>2018</inceptionYear>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${basedir}</directory>
|
||||
<includes>
|
||||
<include>index.d.ts</include>
|
||||
</includes>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>codenvy-release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-dts</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<exec executable="bash" failonerror="true">
|
||||
<arg value="-c" />
|
||||
<arg value="docker run -i --rm -v "$HOME/.m2:/root/.m2"
|
||||
-v "${basedir}/dto-pom.xml:/usr/src/mymaven/pom.xml"
|
||||
-w /usr/src/mymaven maven:3.3-jdk-8
|
||||
/bin/bash -c "mvn -q -U -DskipTests=true -Dfindbugs.skip=true -Dskip-validate-sources install
|
||||
&& cat target/dts-dto-typescript.d.ts" >>
|
||||
index.d.ts" />
|
||||
</exec>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<!-- build workspace loader with maven in docker -->
|
||||
<exec dir="${basedir}" executable="docker" failonerror="true">
|
||||
<arg value="build" />
|
||||
<arg value="-t" />
|
||||
<arg value="eclipse-che-ts-api" />
|
||||
<arg value="--build-arg" />
|
||||
<arg value="CHE_VERSION=${che.version}" />
|
||||
<arg value="--build-arg" />
|
||||
<arg value="NPM_AUTH_TOKEN=${NPM_AUTH_TOKEN}" />
|
||||
<arg value="." />
|
||||
</exec>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
Loading…
Reference in New Issue