From b64e2484d968afdc953f2e1cd99f39bdd34d29e9 Mon Sep 17 00:00:00 2001 From: James Daniels Date: Wed, 15 May 2019 11:40:21 -0700 Subject: [PATCH] Canary and next builds --- cloudbuild.yaml | 12 ++++++++++-- reactfire/package.json | 2 +- sample-complex/package.json | 2 +- sample-simple/package.json | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index a0e625a..78c4637 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -9,13 +9,21 @@ steps: args: ['test'] - name: 'gcr.io/cloud-builders/npm' dir: 'reactfire' - args: ['publish'] entrypoint: 'sh' + env: + - 'SHORT_SHA=$SHORT_SHA' + - 'TAG_NAME=$TAG_NAME' args: - -c - | echo "//registry.npmjs.org/:_authToken=$$NPM_TOKEN" > .npmrc - npm publish . --tag exp + if test $TAG_NAME; then + npm version $TAG_NAME + npm publish . --tag next + else + npm version $(npm view reactfire-exp version)-canary.$SHORT_SHA + npm publish . --tag canary + fi rm -f .npmrc secretEnv: ['NPM_TOKEN'] diff --git a/reactfire/package.json b/reactfire/package.json index 980c636..dd76200 100644 --- a/reactfire/package.json +++ b/reactfire/package.json @@ -1,6 +1,6 @@ { "name": "reactfire-exp", - "version": "2.0.0-exp.1", + "version": "0.0.0", "description": "Firebase library for React", "main": "index.js", "scripts": { diff --git a/sample-complex/package.json b/sample-complex/package.json index 425604d..6b7b55d 100644 --- a/sample-complex/package.json +++ b/sample-complex/package.json @@ -25,6 +25,6 @@ "firebase-admin": "^7.3.0", "react": "^16.8.6", "react-dom": "^16.8.6", - "reactfire-exp": ">= 2.0.0-exp.1" + "reactfire-exp": "0.0.0" } } diff --git a/sample-simple/package.json b/sample-simple/package.json index 95ab086..83b41c9 100644 --- a/sample-simple/package.json +++ b/sample-simple/package.json @@ -10,7 +10,7 @@ "react-dom": "^16.8.6", "react-firebaseui": "^3.1.2", "react-scripts": "3.0.0", - "reactfire-exp": ">= 2.0.0-exp.1" + "reactfire-exp": "0.0.0" }, "scripts": { "start": "react-scripts start",