Merge pull request #525 from resin-io/508-fix-docs

Get docs and the code generating them back in sync
This commit is contained in:
Tim Perry 2017-05-12 13:27:35 +02:00 committed by GitHub
commit 88d5ec0c94
7 changed files with 43 additions and 28 deletions

View File

@ -22,12 +22,12 @@ commandOptions = require('./command-options');
exports.create = { exports.create = {
signature: 'app create <name>', signature: 'app create <name>',
description: 'create an application', description: 'create an application',
help: 'Use this command to create a new resin.io application.\n\nYou can specify the application type with the `--type` option.\nOtherwise, an interactive dropdown will be shown for you to select from.\n\nYou can see a list of supported device types with\n\n $ resin devices supported\n\nExamples:\n\n $ resin app create MyApp\n $ resin app create MyApp --type raspberry-pi', help: 'Use this command to create a new resin.io application.\n\nYou can specify the application device type with the `--type` option.\nOtherwise, an interactive dropdown will be shown for you to select from.\n\nYou can see a list of supported device types with\n\n $ resin devices supported\n\nExamples:\n\n $ resin app create MyApp\n $ resin app create MyApp --type raspberry-pi',
options: [ options: [
{ {
signature: 'type', signature: 'type',
parameter: 'type', parameter: 'type',
description: 'application type', description: 'application device type (Check available types with `resin devices supported`)',
alias: 't' alias: 't'
} }
], ],

View File

@ -26,7 +26,7 @@ exports.read = {
options: [ options: [
{ {
signature: 'type', signature: 'type',
description: 'device type', description: 'device type (Check available types with `resin devices supported`)',
parameter: 'type', parameter: 'type',
alias: 't', alias: 't',
required: 'You have to specify a device type' required: 'You have to specify a device type'
@ -63,7 +63,7 @@ exports.write = {
options: [ options: [
{ {
signature: 'type', signature: 'type',
description: 'device type', description: 'device type (Check available types with `resin devices supported`)',
parameter: 'type', parameter: 'type',
alias: 't', alias: 't',
required: 'You have to specify a device type' required: 'You have to specify a device type'
@ -108,7 +108,7 @@ exports.inject = {
options: [ options: [
{ {
signature: 'type', signature: 'type',
description: 'device type', description: 'device type (Check available types with `resin devices supported`)',
parameter: 'type', parameter: 'type',
alias: 't', alias: 't',
required: 'You have to specify a device type' required: 'You have to specify a device type'
@ -147,7 +147,7 @@ exports.reconfigure = {
options: [ options: [
{ {
signature: 'type', signature: 'type',
description: 'device type', description: 'device type (Check available types with `resin devices supported`)',
parameter: 'type', parameter: 'type',
alias: 't', alias: 't',
required: 'You have to specify a device type' required: 'You have to specify a device type'

View File

@ -56,7 +56,7 @@ resolveVersion = function(deviceType, version) {
exports.download = { exports.download = {
signature: 'os download <type>', signature: 'os download <type>',
description: 'download an unconfigured os image', description: 'download an unconfigured os image',
help: 'Use this command to download an unconfigured os image for a certain device type.\n\nIf version is not specified the newest stable (non-pre-release) version of OS\nis downloaded if available, or the newest version otherwise (if all existing\nversions for the given device type are pre-release).\n\nYou can pass `--version menu` to pick the OS version from the interactive menu\nof all available versions.\n\nExamples:\n\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 1.24.1\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version ^1.20.0\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version latest\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version default\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version menu', help: 'Use this command to download an unconfigured os image for a certain device type.\nCheck available types with `resin devices supported`\n\nIf version is not specified the newest stable (non-pre-release) version of OS\nis downloaded if available, or the newest version otherwise (if all existing\nversions for the given device type are pre-release).\n\nYou can pass `--version menu` to pick the OS version from the interactive menu\nof all available versions.\n\nExamples:\n\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 1.24.1\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version ^1.20.0\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version latest\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version default\n $ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version menu',
permission: 'user', permission: 'user',
options: [ options: [
{ {
@ -173,7 +173,7 @@ exports.initialize = {
options: [ options: [
commandOptions.yes, { commandOptions.yes, {
signature: 'type', signature: 'type',
description: 'device type', description: 'device type (Check available types with `resin devices supported`)',
parameter: 'type', parameter: 'type',
alias: 't', alias: 't',
required: 'You have to specify a device type' required: 'You have to specify a device type'

View File

@ -145,7 +145,7 @@ environment variable (in the same standard URL format).
Use this command to create a new resin.io application. Use this command to create a new resin.io application.
You can specify the application type with the `--type` option. You can specify the application device type with the `--type` option.
Otherwise, an interactive dropdown will be shown for you to select from. Otherwise, an interactive dropdown will be shown for you to select from.
You can see a list of supported device types with You can see a list of supported device types with
@ -159,9 +159,9 @@ Examples:
### Options ### Options
#### --type, -t &#60;type&#62; (Check available types with [resin devices supported](#devices-supported)) #### --type, -t &#60;type&#62;
application type application device type (Check available types with `resin devices supported`)
## apps ## apps
@ -812,6 +812,7 @@ device uuid
## os download &#60;type&#62; ## os download &#60;type&#62;
Use this command to download an unconfigured os image for a certain device type. Use this command to download an unconfigured os image for a certain device type.
Check available types with `resin devices supported`
If version is not specified the newest stable (non-pre-release) version of OS If version is not specified the newest stable (non-pre-release) version of OS
is downloaded if available, or the newest version otherwise (if all existing is downloaded if available, or the newest version otherwise (if all existing
@ -874,9 +875,9 @@ Examples:
confirm non interactively confirm non interactively
#### --type, -t &#60;type&#62; (Check available types with [resin devices supported](#devices-supported)) #### --type, -t &#60;type&#62;
device type device type (Check available types with `resin devices supported`)
#### --drive, -d &#60;drive&#62; #### --drive, -d &#60;drive&#62;
@ -895,9 +896,9 @@ Examples:
### Options ### Options
#### --type, -t &#60;type&#62; (Check available types with [resin devices supported](#devices-supported)) #### --type, -t &#60;type&#62;
device type device type (Check available types with `resin devices supported`)
#### --drive, -d &#60;drive&#62; #### --drive, -d &#60;drive&#62;
@ -915,9 +916,9 @@ Examples:
### Options ### Options
#### --type, -t &#60;type&#62; (Check available types with [resin devices supported](#devices-supported)) #### --type, -t &#60;type&#62;
device type device type (Check available types with `resin devices supported`)
#### --drive, -d &#60;drive&#62; #### --drive, -d &#60;drive&#62;
@ -934,9 +935,9 @@ Examples:
### Options ### Options
#### --type, -t &#60;type&#62; (Check available types with [resin devices supported](#devices-supported)) #### --type, -t &#60;type&#62;
device type device type (Check available types with `resin devices supported`)
#### --drive, -d &#60;drive&#62; #### --drive, -d &#60;drive&#62;
@ -954,9 +955,9 @@ Examples:
### Options ### Options
#### --type, -t &#60;type&#62; (Check available types with [resin devices supported](#devices-supported)) #### --type, -t &#60;type&#62;
device type device type (Check available types with `resin devices supported`)
#### --drive, -d &#60;drive&#62; #### --drive, -d &#60;drive&#62;
@ -1335,6 +1336,10 @@ Docker host TLS key file
The alias to the generated image The alias to the generated image
#### --buildArg, -B &#60;arg&#62;
Set a build-time variable (eg. "-B 'ARG=value'"). Can be specified multiple times.
#### --nocache #### --nocache
Don't use docker layer caching when building Don't use docker layer caching when building
@ -1362,6 +1367,10 @@ Build image then deploy
The source directory to use when building the image The source directory to use when building the image
#### --nologupload
Don't upload build logs to the dashboard with image (if building)
#### --docker, -P &#60;docker&#62; #### --docker, -P &#60;docker&#62;
Path to a local docker socket Path to a local docker socket
@ -1390,6 +1399,11 @@ Docker host TLS key file
The alias to the generated image The alias to the generated image
#### --buildArg, -B &#60;arg&#62;
Set a build-time variable (eg. "-B 'ARG=value'"). Can be specified multiple times.
#### --nocache #### --nocache
Don't use docker layer caching when building Don't use docker layer caching when building

View File

@ -22,7 +22,7 @@ exports.create =
help: ''' help: '''
Use this command to create a new resin.io application. Use this command to create a new resin.io application.
You can specify the application type with the `--type` option. You can specify the application device type with the `--type` option.
Otherwise, an interactive dropdown will be shown for you to select from. Otherwise, an interactive dropdown will be shown for you to select from.
You can see a list of supported device types with You can see a list of supported device types with
@ -38,7 +38,7 @@ exports.create =
{ {
signature: 'type' signature: 'type'
parameter: 'type' parameter: 'type'
description: 'application type' description: 'application device type (Check available types with `resin devices supported`)'
alias: 't' alias: 't'
} }
] ]

View File

@ -30,7 +30,7 @@ exports.read =
options: [ options: [
{ {
signature: 'type' signature: 'type'
description: 'device type' description: 'device type (Check available types with `resin devices supported`)'
parameter: 'type' parameter: 'type'
alias: 't' alias: 't'
required: 'You have to specify a device type' required: 'You have to specify a device type'
@ -75,7 +75,7 @@ exports.write =
options: [ options: [
{ {
signature: 'type' signature: 'type'
description: 'device type' description: 'device type (Check available types with `resin devices supported`)'
parameter: 'type' parameter: 'type'
alias: 't' alias: 't'
required: 'You have to specify a device type' required: 'You have to specify a device type'
@ -126,7 +126,7 @@ exports.inject =
options: [ options: [
{ {
signature: 'type' signature: 'type'
description: 'device type' description: 'device type (Check available types with `resin devices supported`)'
parameter: 'type' parameter: 'type'
alias: 't' alias: 't'
required: 'You have to specify a device type' required: 'You have to specify a device type'
@ -172,7 +172,7 @@ exports.reconfigure =
options: [ options: [
{ {
signature: 'type' signature: 'type'
description: 'device type' description: 'device type (Check available types with `resin devices supported`)'
parameter: 'type' parameter: 'type'
alias: 't' alias: 't'
required: 'You have to specify a device type' required: 'You have to specify a device type'

View File

@ -46,6 +46,7 @@ exports.download =
description: 'download an unconfigured os image' description: 'download an unconfigured os image'
help: ''' help: '''
Use this command to download an unconfigured os image for a certain device type. Use this command to download an unconfigured os image for a certain device type.
Check available types with `resin devices supported`
If version is not specified the newest stable (non-pre-release) version of OS If version is not specified the newest stable (non-pre-release) version of OS
is downloaded if available, or the newest version otherwise (if all existing is downloaded if available, or the newest version otherwise (if all existing
@ -198,7 +199,7 @@ exports.initialize =
commandOptions.yes commandOptions.yes
{ {
signature: 'type' signature: 'type'
description: 'device type' description: 'device type (Check available types with `resin devices supported`)'
parameter: 'type' parameter: 'type'
alias: 't' alias: 't'
required: 'You have to specify a device type' required: 'You have to specify a device type'