mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Add --note
option for push
and deploy
Change-type: minor Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
This commit is contained in:
parent
a92f58134f
commit
18eedfec7f
@ -2732,6 +2732,7 @@ Examples:
|
||||
$ balena push myFleet
|
||||
$ balena push myFleet --source <source directory>
|
||||
$ balena push myFleet -s <source directory>
|
||||
$ balena push myFleet --source <source directory> --note "this is the note for this release"
|
||||
$ balena push myFleet --release-tag key1 "" key2 "value2 with spaces"
|
||||
$ balena push myorg/myfleet
|
||||
|
||||
@ -2848,6 +2849,10 @@ by the 'track latest' release policy but can be used through release pinning.
|
||||
Draft releases can be marked as final through the API. Releases are created
|
||||
as final by default unless this option is given.
|
||||
|
||||
#### --note NOTE
|
||||
|
||||
The notes for this release
|
||||
|
||||
# Settings
|
||||
|
||||
## settings
|
||||
@ -3213,6 +3218,7 @@ Examples:
|
||||
|
||||
$ balena deploy myFleet
|
||||
$ balena deploy myorg/myfleet --build --source myBuildDir/
|
||||
$ balena deploy myorg/myfleet --build --source myBuildDir/ --note "this is the note for this release"
|
||||
$ balena deploy myorg/myfleet myRepo/myImage
|
||||
$ balena deploy myFleet myRepo/myImage --release-tag key1 "" key2 "value2 with spaces"
|
||||
|
||||
@ -3253,6 +3259,10 @@ by the 'track latest' release policy but can be used through release pinning.
|
||||
Draft releases can be marked as final through the API. Releases are created
|
||||
as final by default unless this option is given.
|
||||
|
||||
#### --note NOTE
|
||||
|
||||
The notes for this release
|
||||
|
||||
#### -e, --emulated
|
||||
|
||||
Use QEMU for ARM architecture emulation during the image build
|
||||
|
@ -60,6 +60,7 @@ interface FlagsDef extends ComposeCliFlags, DockerCliFlags {
|
||||
nologupload: boolean;
|
||||
'release-tag'?: string[];
|
||||
draft: boolean;
|
||||
note?: string;
|
||||
help: void;
|
||||
}
|
||||
|
||||
@ -101,6 +102,7 @@ ${dockerignoreHelp}
|
||||
public static examples = [
|
||||
'$ balena deploy myFleet',
|
||||
'$ balena deploy myorg/myfleet --build --source myBuildDir/',
|
||||
'$ balena deploy myorg/myfleet --build --source myBuildDir/ --note "this is the note for this release"',
|
||||
'$ balena deploy myorg/myfleet myRepo/myImage',
|
||||
'$ balena deploy myFleet myRepo/myImage --release-tag key1 "" key2 "value2 with spaces"',
|
||||
];
|
||||
@ -145,6 +147,7 @@ ${dockerignoreHelp}
|
||||
as final by default unless this option is given.`,
|
||||
default: false,
|
||||
}),
|
||||
note: flags.string({ description: 'The notes for this release' }),
|
||||
...composeCliFlags,
|
||||
...dockerCliFlags,
|
||||
// NOTE: Not supporting -h for help, because of clash with -h in DockerCliFlags
|
||||
@ -231,6 +234,9 @@ ${dockerignoreHelp}
|
||||
releaseTagKeys,
|
||||
releaseTagValues,
|
||||
);
|
||||
if (options.note) {
|
||||
await sdk.models.release.note(release.id, options.note);
|
||||
}
|
||||
}
|
||||
|
||||
async deployProject(
|
||||
|
@ -55,6 +55,7 @@ interface FlagsDef {
|
||||
'multi-dockerignore': boolean;
|
||||
'release-tag'?: string[];
|
||||
draft: boolean;
|
||||
note?: string;
|
||||
help: void;
|
||||
}
|
||||
|
||||
@ -97,6 +98,7 @@ export default class PushCmd extends Command {
|
||||
'$ balena push myFleet',
|
||||
'$ balena push myFleet --source <source directory>',
|
||||
'$ balena push myFleet -s <source directory>',
|
||||
'$ balena push myFleet --source <source directory> --note "this is the note for this release"',
|
||||
'$ balena push myFleet --release-tag key1 "" key2 "value2 with spaces"',
|
||||
'$ balena push myorg/myfleet',
|
||||
'',
|
||||
@ -241,6 +243,7 @@ export default class PushCmd extends Command {
|
||||
as final by default unless this option is given.`,
|
||||
default: false,
|
||||
}),
|
||||
note: flags.string({ description: 'The notes for this release' }),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
@ -354,6 +357,9 @@ export default class PushCmd extends Command {
|
||||
releaseTagKeys,
|
||||
releaseTagValues,
|
||||
);
|
||||
if (options.note) {
|
||||
await sdk.models.release.note(releaseId, options.note);
|
||||
}
|
||||
} else if (releaseTagKeys.length > 0) {
|
||||
throw new Error(stripIndent`
|
||||
A release ID could not be parsed out of the builder's output.
|
||||
|
Loading…
Reference in New Issue
Block a user