From 1057eaae19972e891cd077c25785fb10e0ba6daa Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Tue, 15 Sep 2020 09:25:13 +0200 Subject: [PATCH] fix(typescript-dto): Check that output is correct before continuing It's still strange as with -e/-u flag of script, build script should exit in case of error Change-Id: I9314ef7d8df68927d4a710cef8e9366d3582d83d Signed-off-by: Florent Benoit --- typescript-dto/build.sh | 10 ++++++++-- typescript-dto/dto-pom.xml | 6 +++--- typescript-dto/package.json | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/typescript-dto/build.sh b/typescript-dto/build.sh index a53c24c0d8..1ecf8dccee 100755 --- a/typescript-dto/build.sh +++ b/typescript-dto/build.sh @@ -20,6 +20,12 @@ docker run -i --rm -v "$HOME/.m2:/root/.m2" \ /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 -CHE_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec -f ../pom.xml) +# validate that index.d.ts has kind of valid output +if ! grep "export namespace" index.d.ts; then + echo "Invalid output generated for index.d.ts" + exit 1 +fi -docker build -t eclipse-che-ts-api --build-arg CHE_VERSION=${CHE_VERSION} --build-arg NPM_AUTH_TOKEN=${NPM_AUTH_TOKEN} . +CHE_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec -f ../pom.xml) + +docker build -t eclipse-che-ts-api --build-arg CHE_VERSION="${CHE_VERSION}" --build-arg NPM_AUTH_TOKEN="${NPM_AUTH_TOKEN}" . diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 08c123d9c8..2e70d3ea5a 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -17,14 +17,14 @@ 4.0.0 maven-depmgt-pom - org.eclipse.che.depmgt - 7.8.0-SNAPSHOT + org.eclipse.che.parent + 7.19.0-SNAPSHOT dts-dto-typescript pom Che TypeScript DTO - 7.8.0-SNAPSHOT + 7.19.0-SNAPSHOT diff --git a/typescript-dto/package.json b/typescript-dto/package.json index 5c8fb10ab0..6b5ffcbcac 100644 --- a/typescript-dto/package.json +++ b/typescript-dto/package.json @@ -1,6 +1,6 @@ { "name": "@eclipse-che/api", - "version": "7.4.0-SNAPSHOT", + "version": "7.19.0-SNAPSHOT", "description": "Eclipse Che DTO API", "types": "index.d.ts", "license": "EPL-2.0",