From 4da108d5322b1343c8912e036f55c1ecf4ac1855 Mon Sep 17 00:00:00 2001 From: Simon Delisle Date: Tue, 23 Apr 2019 10:02:34 -0400 Subject: [PATCH] Update travis config for "next" publish Signed-off-by: Simon Delisle --- package.json | 4 ++-- src/index.ts | 1 + src/protocol/tsp-client-response.ts | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ac6f12c..6c30ba0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tsp-typescript-client", - "version": "0.0.0", + "version": "0.1.0", "description": "Trace Server Protocol client written in TypeScript", "author": "Ericsson and others", "main": "lib/index.js", @@ -38,6 +38,6 @@ }, "scripts": { "build": "tsc", - "publish:next": "yarn publish --tag next" + "publish:next": "yarn publish --new-version \"$(semver $npm_package_version -i minor)-next.$(git rev-parse --short HEAD)\" --tag next" } } diff --git a/src/index.ts b/src/index.ts index 3a99fb9..eaa6703 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,3 +12,4 @@ export * from './models/trace'; export * from './models/xy'; export * from './protocol/tsp-client'; export * from './protocol/rest-client'; +export * from './protocol/tsp-client-response'; diff --git a/src/protocol/tsp-client-response.ts b/src/protocol/tsp-client-response.ts index 2dd18c2..08fc3b1 100644 --- a/src/protocol/tsp-client-response.ts +++ b/src/protocol/tsp-client-response.ts @@ -40,6 +40,9 @@ export class TspClientResponse { return this.statusMessage; } + /** + * Check if the status code is 200 + */ public isOk(): boolean { // TODO Use a constant return this.statusCode === 200;