diff --git a/README.md b/README.md index 042013c1..9026bb39 100644 --- a/README.md +++ b/README.md @@ -139,12 +139,14 @@ The full CLI command reference is available [on the web](https://www.balena.io/d ## Support, FAQ and troubleshooting -If you come across any problems or would like to get in touch: +To learn more, troubleshoot issues, or to contact us for support: -* Check our [FAQ / troubleshooting document](https://github.com/balena-io/balena-cli/blob/master/TROUBLESHOOTING.md). -* Ask us a question through the [balenaCloud forum](https://forums.balena.io/c/balena-cloud). -* For bug reports or feature requests, - [have a look at the GitHub issues or create a new one](https://github.com/balena-io/balena-cli/issues/). +* Check the [masterclass tutorials](https://www.balena.io/docs/learn/more/masterclasses/overview/) +* Check our [FAQ / troubleshooting document](https://github.com/balena-io/balena-cli/blob/master/TROUBLESHOOTING.md) +* Ask us a question through the [balenaCloud forum](https://forums.balena.io/c/balena-cloud) + +For CLI bug reports or feature requests, check the +[CLI GitHub issues](https://github.com/balena-io/balena-cli/issues/). ## Deprecation policy diff --git a/doc/cli.markdown b/doc/cli.markdown index de8dad59..30a8f481 100644 --- a/doc/cli.markdown +++ b/doc/cli.markdown @@ -127,12 +127,14 @@ address like `192.168.1.2`. ## Support, FAQ and troubleshooting -If you come across any problems or would like to get in touch: +To learn more, troubleshoot issues, or to contact us for support: -* Check our [FAQ / troubleshooting document](https://github.com/balena-io/balena-cli/blob/master/TROUBLESHOOTING.md). -* Ask us a question through the [balenaCloud forum](https://forums.balena.io/c/balena-cloud). -* For bug reports or feature requests, - [have a look at the GitHub issues or create a new one](https://github.com/balena-io/balena-cli/issues/). +* Check the [masterclass tutorials](https://www.balena.io/docs/learn/more/masterclasses/overview/) +* Check our [FAQ / troubleshooting document](https://github.com/balena-io/balena-cli/blob/master/TROUBLESHOOTING.md) +* Ask us a question through the [balenaCloud forum](https://forums.balena.io/c/balena-cloud) + +For CLI bug reports or feature requests, check the +[CLI GitHub issues](https://github.com/balena-io/balena-cli/issues/). ## Deprecation policy diff --git a/lib/help.ts b/lib/help.ts index b2f67200..0c94b762 100644 --- a/lib/help.ts +++ b/lib/help.ts @@ -1,3 +1,19 @@ +/** + * @license + * Copyright 2017-2020 Balena Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import Help from '@oclif/plugin-help'; import * as indent from 'indent-string'; import { getChalk } from './utils/lazy'; @@ -123,16 +139,10 @@ export default class BalenaHelp extends Help { console.log(' --help, -h'); console.log(' --debug\n'); - console.log( - `For help, visit our support forums: ${chalk.grey( - 'https://forums.balena.io', - )}`, - ); - console.log( - `For bug reports or feature requests, see: ${chalk.grey( - 'https://github.com/balena-io/balena-cli/issues/', - )}\n`, - ); + const { + reachingOut, + } = require('./utils/messages') as typeof import('./utils/messages'); + console.log(reachingOut); } protected formatCommands(commands: any[]): string { diff --git a/lib/utils/messages.ts b/lib/utils/messages.ts index 00089ad7..47d3b4ff 100644 --- a/lib/utils/messages.ts +++ b/lib/utils/messages.ts @@ -16,21 +16,15 @@ */ export const reachingOut = `\ -If you need help, or just want to say hi, don't hesitate in reaching out -through our discussion and support forums at https://forums.balena.io - -For bug reports or feature requests, have a look at the GitHub issues or -create a new one at: https://github.com/balena-io/balena-cli/issues/\ +For further help or support, visit: +https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting `; const debugHint = `\ Additional information may be available with the \`--debug\` flag. \n`; -export const help = `\ -For help, visit our support forums: https://forums.balena.io -For bug reports or feature requests, see: https://github.com/balena-io/balena-cli/issues/ -`; +export const help = reachingOut; // Note that the value of process.env.DEBUG may change after the --debug flag // is parsed, so its evaluation cannot happen at module loading time. diff --git a/tests/commands/help.spec.ts b/tests/commands/help.spec.ts index 2d506bba..248a147e 100644 --- a/tests/commands/help.spec.ts +++ b/tests/commands/help.spec.ts @@ -19,6 +19,7 @@ import { expect } from 'chai'; import { BalenaAPIMock } from '../balena-api-mock'; import { cleanOutput, runCommand } from '../helpers'; +import * as messages from '../../build/utils/messages'; const SIMPLE_HELP = ` USAGE @@ -103,10 +104,7 @@ GLOBAL OPTIONS `; -const ONLINE_RESOURCES = ` -For help, visit our support forums: https://forums.balena.io -For bug reports or feature requests, see: https://github.com/balena-io/balena-cli/issues/ -`; +const ONLINE_RESOURCES = messages.reachingOut; describe.skip('balena help', function () { let api: BalenaAPIMock;