From a91baad92fa62c53179fcf9bcfcbd52fc80da47a Mon Sep 17 00:00:00 2001 From: Amio Date: Wed, 19 Sep 2018 10:30:30 +0800 Subject: [PATCH] chore: revert 211e3015, better integrate with now --- README.md | 4 +--- now.json | 5 +++++ package.json | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f45133c..e70dae7 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,6 @@ At the time of badgen.now.sh's reveal, it had only four live badges as demonstra [![Maintainability][maintainability-src]][maintainability-href] [![Code Quality][codequality-src]][codequality-href] [![LGTM Alerts][alerts-src]][alerts-href] -[![Deploy to Now][deploy-to-now-src]](#deploy-to-now) We are using [StandardJS][standard-href] style, make sure you have ESLint/Standard plugin on your editor and have autofix enabled. @@ -74,7 +73,7 @@ Badgen Server will auto load all svg files in [libs/icons](libs/icons/). Please Badgen is stateless (does not rely on DB service). Deploy your own instance to [Now][now-href] with one single command: ``` -now amio/badgen-service +now amio/badgen-service -e GH_TOKEN='' -e TRACKING_GA='' -e SENTRY_URI='' ``` ## Tracking Policy @@ -97,7 +96,6 @@ built with ⚡️ from [badgen](https://github.com/amio/badgen). [dependencies-href]: https://david-dm.org/amio/badgen-service [standard-src]: https://badgen.net/badge/code%20style/standard/pink [standard-href]: https://standardjs.com -[deploy-to-now-src]: https://badgen.net/badge/▲/$%20now%20amio%2Fbadgen-service/333 [maintainability-src]: https://badgen.net/codeclimate/maintainability/amio/badgen-service [maintainability-href]: https://codeclimate.com/github/amio/badgen-service [codequality-src]: https://badgen.net/lgtm/grade/javascript/g/amio/badgen-service diff --git a/now.json b/now.json index 8eed0bc..e989559 100644 --- a/now.json +++ b/now.json @@ -14,6 +14,11 @@ "static", "components" ], + "env": { + "GH_TOKEN": "@badgen-gh-token", + "SENTRY_URI": "@badgen-sentry-uri", + "TRACKING_GA": "@badgen-tracking-ga" + }, "engines": { "node": "^10.0.0" }, diff --git a/package.json b/package.json index 6494f83..9f71365 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "pretest": "npm run lint", "test": "tap test/*.js --reporter spec -j12", "start": "node service.js", - "predeploy": "now -T amio inspect badgen.net && now rm badgen-service --safe -y -T amio || true", - "deploy": "now -T amio -e GH_TOKEN='@badgen-gh-token' -e SENTRY_URI='@badgen-sentry-uri' -e TRACKING_GA='@badgen-tracking-ga'", - "postdeploy": "now -T amio alias", - "canary": "now -T amio -e GH_TOKEN='@badgen-gh-token' && now -T amio alias badgen-canary" + "now-prune": "now rm badgen-service --safe -y -T amio || true", + "predeploy": "now -T amio inspect badgen.net && npm run now-prune", + "deploy": "now -T amio && now -T amio alias", + "canary": "now -T amio && now -T amio alias badgen-canary" }, "standard": { "parser": "babel-eslint"