mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Check logged in for balena build
if application specified
Correct eroneous -f flag in `balena build` help Change-type: patch Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
parent
77873cf919
commit
d2fd1ec80a
@ -1888,11 +1888,11 @@ You must provide either an application or a device-type/architecture pair to use
|
||||
the balena Dockerfile pre-processor (e.g. Dockerfile.template -> Dockerfile).
|
||||
|
||||
This command will look into the given source directory (or the current working
|
||||
directory if one isn't specified) for a docker-compose.yml file. If it is found,
|
||||
this command will build each service defined in the compose file. If a compose
|
||||
file isn't found, the command will look for a Dockerfile[.template] file (or
|
||||
alternative Dockerfile specified with the `-f` option), and if yet that isn't
|
||||
found, it will try to generate one.
|
||||
directory if one isn't specified) for a docker-compose.yml file, and if found,
|
||||
each service defined in the compose file will be built. If a compose file isn't
|
||||
found, it will look for a Dockerfile[.template] file (or alternative Dockerfile
|
||||
specified with the `--dockerfile` option), and if no dockerfile is found, it
|
||||
will try to generate one.
|
||||
|
||||
The --registry-secrets option specifies a JSON or YAML file containing private
|
||||
Docker registry usernames and passwords to be used when pulling base images.
|
||||
|
@ -77,11 +77,11 @@ module.exports =
|
||||
the balena Dockerfile pre-processor (e.g. Dockerfile.template -> Dockerfile).
|
||||
|
||||
This command will look into the given source directory (or the current working
|
||||
directory if one isn't specified) for a docker-compose.yml file. If it is found,
|
||||
this command will build each service defined in the compose file. If a compose
|
||||
file isn't found, the command will look for a Dockerfile[.template] file (or
|
||||
alternative Dockerfile specified with the `-f` option), and if yet that isn't
|
||||
found, it will try to generate one.
|
||||
directory if one isn't specified) for a docker-compose.yml file, and if found,
|
||||
each service defined in the compose file will be built. If a compose file isn't
|
||||
found, it will look for a Dockerfile[.template] file (or alternative Dockerfile
|
||||
specified with the `--dockerfile` option), and if no dockerfile is found, it
|
||||
will try to generate one.
|
||||
|
||||
#{registrySecretsHelp}
|
||||
|
||||
@ -121,6 +121,7 @@ module.exports =
|
||||
|
||||
sdk = getBalenaSdk()
|
||||
{ ExpectedError } = require('../errors')
|
||||
{ checkLoggedIn } = require('../utils/patterns')
|
||||
{ validateProjectDirectory } = require('../utils/compose_ts')
|
||||
helpers = require('../utils/helpers')
|
||||
Logger = require('../utils/logger')
|
||||
@ -141,6 +142,8 @@ module.exports =
|
||||
Promise.try ->
|
||||
if (not (arch? and deviceType?) and not application?) or (application? and (arch? or deviceType?))
|
||||
throw new ExpectedError('You must specify either an application or an arch/deviceType pair to build for')
|
||||
if (application)
|
||||
checkLoggedIn()
|
||||
.then ->
|
||||
validateProjectDirectory(sdk, {
|
||||
dockerfilePath: options.dockerfile,
|
||||
|
Loading…
Reference in New Issue
Block a user