mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-24 18:45:07 +00:00
Compare commits
20 Commits
npm-global
...
v17.5.1
Author | SHA1 | Date | |
---|---|---|---|
f550d0c596 | |||
54302669b8 | |||
a4a4e33d7b | |||
8d6a621bfb | |||
4b2602676b | |||
b0810c0f85 | |||
97a6013537 | |||
1ba8db1459 | |||
cdada0aec8 | |||
1166533482 | |||
01538728cd | |||
3a7f6d78b0 | |||
dce48c90e9 | |||
fe70d164c1 | |||
09e2550b32 | |||
07854c3d42 | |||
858a455501 | |||
4e5eb4bcee | |||
696bad3ed6 | |||
9a9d0f02ef |
@ -1,3 +1,334 @@
|
||||
- commits:
|
||||
- subject: Fix target state construction with livepush
|
||||
hash: 8d6a621bfb62147ed0a88f58057e38211e82f841
|
||||
body: >
|
||||
When constructing the target state after a reported change from
|
||||
livepush, the
|
||||
|
||||
handler function would not pass all build tasks to the function that
|
||||
|
||||
constructs the target state, causing a TypeError when trying to obtain
|
||||
|
||||
the target image name for each service. This updates the handler to pass
|
||||
|
||||
all build tasks, ensuring the information is available to construct the
|
||||
|
||||
target state.
|
||||
footer:
|
||||
Relates-to: "#2724"
|
||||
relates-to: "#2724"
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Felipe Lalanne
|
||||
nested: []
|
||||
version: 17.5.1
|
||||
title: ""
|
||||
date: 2024-01-31T01:05:17.796Z
|
||||
- commits:
|
||||
- subject: "os versions: Add the --include-draft option"
|
||||
hash: 1ba8db1459355f6a5887f9106876318bd81f7f02
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "device os-update: Add option for including pre-release versions in the
|
||||
list"
|
||||
hash: cdada0aec8e8f7a6c72d629dfa7a36f5d56b1b0d
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "device os-update: Enable updates to pre-release versions of higher
|
||||
base semver"
|
||||
hash: 116653348219f9ce8fd896428d690940350f2597
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Depends-on: https://github.com/balena-io/balena-sdk/pull/1398
|
||||
depends-on: https://github.com/balena-io/balena-sdk/pull/1398
|
||||
See: https://balena.fibery.io/Work/Task/cli-Enable-OS-Updates-to-pre-release-OS-versions-1751
|
||||
see: https://balena.fibery.io/Work/Task/cli-Enable-OS-Updates-to-pre-release-OS-versions-1751
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Update balena-sdk to 19.4.0
|
||||
hash: 01538728cd4a0ad512b45c062b4d45f6d1f664e7
|
||||
body: |
|
||||
Update balena-sdk from 19.0.1 to 19.4.0
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: Update the deviceType.getInstructions tests
|
||||
hash: 3fd5f7d88c6fd335e8ada5c9efd64ddd14c9a992
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "os.getSupportedOsUpdateVersions: Add the option to include draft
|
||||
releases"
|
||||
hash: 87b3187274a5f417ab82855029f517dc99a2f503
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Enable OS Updates to pre-release versions of higher base semver
|
||||
hash: 38360a84d29f316d3619d3b899538ccdf71635fc
|
||||
body: |
|
||||
Update balena-hup-action-utils from 5.0.0 to 6.1.0
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: Enable OS Updates to pre-release versions of higher base semver
|
||||
hash: 1b3e83b9519157be1ca9ba7756bba87a08bea04a
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-hup-action-utils-6.1.0
|
||||
title: ""
|
||||
date: 2024-01-04T13:32:14.391Z
|
||||
- commits:
|
||||
- subject: Drop support for TypeScript < 5.3.3
|
||||
hash: 7c3430280b47ea9a17f7bb94df068f2a46bfa975
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: major
|
||||
change-type: major
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Drop support for node < v18
|
||||
hash: b1eb6844578bff03c05c19bbf6436526a69a8b30
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: major
|
||||
change-type: major
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Update dependencies
|
||||
hash: 7413837d3aed9aa54ec5d1e218647f543308b298
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Move the build step from prepare to prepack
|
||||
hash: c4480c214c79f4e07cf3b65944b83d11c9c2e267
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-hup-action-utils-6.0.0
|
||||
title: ""
|
||||
date: 2023-12-20T13:33:03.867Z
|
||||
- commits:
|
||||
- subject: "patch: Update flowzone.yml"
|
||||
hash: 41a90775219e1b7b144069aea545f8f2141c88f7
|
||||
body: ""
|
||||
footer: {}
|
||||
author: Kyle Harding
|
||||
nested: []
|
||||
version: balena-hup-action-utils-5.0.1
|
||||
title: ""
|
||||
date: 2023-07-13T19:00:55.217Z
|
||||
- subject: "os.getAvailableOsVersions: Add the option to include draft releases"
|
||||
hash: b8e795ac01e2e05c6484cfd492ea9dfd5f16f142
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.4.0
|
||||
title: ""
|
||||
date: 2024-01-23T14:37:21.759Z
|
||||
- commits:
|
||||
- subject: Update date-fns to v3
|
||||
hash: f027a467b4fe45884650d2d8c56ce3a361842a6b
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.3.5
|
||||
title: ""
|
||||
date: 2023-12-21T13:16:48.448Z
|
||||
- commits:
|
||||
- subject: "types/Device: Deprecate the non-existent vpn_address property"
|
||||
hash: 0a9d79b71f7c97813831649d18a4bc1703d71307
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otávio Jacobi
|
||||
nested: []
|
||||
version: balena-sdk-19.3.4
|
||||
title: ""
|
||||
date: 2023-12-15T13:34:05.193Z
|
||||
- commits:
|
||||
- subject: "types/Device: Deprecate the non-existent state & status_sort_index
|
||||
properties"
|
||||
hash: 7013d15352906ae815f5cd630086222f5c9853df
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.3.3
|
||||
title: ""
|
||||
date: 2023-12-15T12:02:22.609Z
|
||||
- commits:
|
||||
- subject: "test:fast: Run the tests ignoring any linting errors"
|
||||
hash: 59811c2f19a2044b4a1a0d1068ba90ee1587f9a3
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "tests: Re-enable the explicit error checks for non-tarball DWB
|
||||
requests"
|
||||
hash: cb7c1a2d842e53255975a91457da00bd7070d8f7
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.3.2
|
||||
title: ""
|
||||
date: 2023-12-08T15:49:54.842Z
|
||||
- commits:
|
||||
- subject: Update TypeScript to 5.3.2
|
||||
hash: d66ee5c290df275e18bbdcf8bd5cf9475e6db768
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.3.1
|
||||
title: ""
|
||||
date: 2023-11-30T15:10:55.747Z
|
||||
- commits:
|
||||
- subject: "tests: Remove the explicit error checks for non-tarball DWB requests"
|
||||
hash: 0ca96b7440af76a1b7c52899d880dc817cf69278
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "tests: Properly cleanup the test orgs"
|
||||
hash: 431acbfa773b271b614c619595abc61f3c6e791c
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "tests: Reduce the request batching chunk size to speed up tests"
|
||||
hash: d3397cb6fdf6fd7edb4247d0d5980086e9338c1d
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Add option for configuring the request batching chunk size
|
||||
hash: 94e5d7816ac813e9b8468b73e3d365f735182f4b
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.3.0
|
||||
title: ""
|
||||
date: 2023-11-30T13:54:32.874Z
|
||||
- commits:
|
||||
- subject: Add organization logo to organization
|
||||
hash: 251e835ad6fe778024bbe358fa70aa73c8e250b8
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Otávio Jacobi
|
||||
nested: []
|
||||
version: balena-sdk-19.2.0
|
||||
title: ""
|
||||
date: 2023-11-13T11:20:58.418Z
|
||||
- commits:
|
||||
- subject: Add the retryRateLimitedRequests sdk option for retrying after HTTP
|
||||
429s
|
||||
hash: 25e83b67f6f7c3f20982c97d4e561dd81c37a672
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.1.0
|
||||
title: ""
|
||||
date: 2023-11-06T13:49:10.660Z
|
||||
version: 17.5.0
|
||||
title: ""
|
||||
date: 2024-01-23T15:52:49.156Z
|
||||
- commits:
|
||||
- subject: Regression described in GitHub Issue 2715; balena push hangs in local
|
||||
mode.
|
||||
hash: 09e2550b32f628f8e5b5cb8be0cafe4b40c7ce10
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Ken Bannister <kb2ma@runbox.com>
|
||||
signed-off-by: Ken Bannister <kb2ma@runbox.com>
|
||||
author: Ken Bannister
|
||||
nested: []
|
||||
version: 17.4.12
|
||||
title: ""
|
||||
date: 2024-01-18T10:55:45.599Z
|
||||
- commits:
|
||||
- subject: Exclude the oclif package patch from the published files
|
||||
hash: 4e5eb4bcee8e33a1aac337401c0180817e152b69
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Update the @oclif/core patch
|
||||
hash: 696bad3ed6f27832bf10f096c088367a57902920
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 17.4.11
|
||||
title: ""
|
||||
date: 2024-01-05T23:01:07.859Z
|
||||
- commits:
|
||||
- subject: Normalize v prefixes in the --version parameter of all commands
|
||||
hash: b7b01ecd5314bddae73b7b062f9d034b3661bcef
|
||||
|
89
CHANGELOG.md
89
CHANGELOG.md
@ -4,6 +4,95 @@ All notable changes to this project will be documented in this file
|
||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 17.5.1 - 2024-01-31
|
||||
|
||||
* Fix target state construction with livepush [Felipe Lalanne]
|
||||
|
||||
## 17.5.0 - 2024-01-23
|
||||
|
||||
* os versions: Add the --include-draft option [Thodoris Greasidis]
|
||||
* device os-update: Add option for including pre-release versions in the list [Thodoris Greasidis]
|
||||
* device os-update: Enable updates to pre-release versions of higher base semver [Thodoris Greasidis]
|
||||
|
||||
<details>
|
||||
<summary> Update balena-sdk to 19.4.0 [Thodoris Greasidis] </summary>
|
||||
|
||||
> ### balena-sdk-19.4.0 - 2024-01-23
|
||||
>
|
||||
> * Update the deviceType.getInstructions tests [Thodoris Greasidis]
|
||||
> * os.getSupportedOsUpdateVersions: Add the option to include draft releases [Thodoris Greasidis]
|
||||
>
|
||||
> <details>
|
||||
> <summary> Enable OS Updates to pre-release versions of higher base semver [Thodoris Greasidis] </summary>
|
||||
>
|
||||
>> #### balena-hup-action-utils-6.1.0 - 2024-01-04
|
||||
>>
|
||||
>> * Enable OS Updates to pre-release versions of higher base semver [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### balena-hup-action-utils-6.0.0 - 2023-12-20
|
||||
>>
|
||||
>> * Drop support for TypeScript < 5.3.3 [Thodoris Greasidis]
|
||||
>> * Drop support for node < v18 [Thodoris Greasidis]
|
||||
>> * Update dependencies [Thodoris Greasidis]
|
||||
>> * Move the build step from prepare to prepack [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### balena-hup-action-utils-5.0.1 - 2023-07-13
|
||||
>>
|
||||
>> * patch: Update flowzone.yml [Kyle Harding]
|
||||
>>
|
||||
>
|
||||
> </details>
|
||||
>
|
||||
> * os.getAvailableOsVersions: Add the option to include draft releases [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.3.5 - 2023-12-21
|
||||
>
|
||||
> * Update date-fns to v3 [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.3.4 - 2023-12-15
|
||||
>
|
||||
> * types/Device: Deprecate the non-existent vpn_address property [Otávio Jacobi]
|
||||
>
|
||||
> ### balena-sdk-19.3.3 - 2023-12-15
|
||||
>
|
||||
> * types/Device: Deprecate the non-existent state & status_sort_index properties [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.3.2 - 2023-12-08
|
||||
>
|
||||
> * test:fast: Run the tests ignoring any linting errors [Thodoris Greasidis]
|
||||
> * tests: Re-enable the explicit error checks for non-tarball DWB requests [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.3.1 - Invalid date
|
||||
>
|
||||
> * Update TypeScript to 5.3.2 [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.3.0 - Invalid date
|
||||
>
|
||||
> * tests: Remove the explicit error checks for non-tarball DWB requests [Thodoris Greasidis]
|
||||
> * tests: Properly cleanup the test orgs [Thodoris Greasidis]
|
||||
> * tests: Reduce the request batching chunk size to speed up tests [Thodoris Greasidis]
|
||||
> * Add option for configuring the request batching chunk size [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.2.0 - 2023-11-13
|
||||
>
|
||||
> * Add organization logo to organization [Otávio Jacobi]
|
||||
>
|
||||
> ### balena-sdk-19.1.0 - 2023-11-06
|
||||
>
|
||||
> * Add the retryRateLimitedRequests sdk option for retrying after HTTP 429s [Thodoris Greasidis]
|
||||
>
|
||||
|
||||
</details>
|
||||
|
||||
## 17.4.12 - 2024-01-18
|
||||
|
||||
* Regression described in GitHub Issue 2715; balena push hangs in local mode. [Ken Bannister]
|
||||
|
||||
## 17.4.11 - 2024-01-05
|
||||
|
||||
* Exclude the oclif package patch from the published files [Thodoris Greasidis]
|
||||
* Update the @oclif/core patch [Thodoris Greasidis]
|
||||
|
||||
## 17.4.10 - 2024-01-02
|
||||
|
||||
* Normalize v prefixes in the --version parameter of all commands [Thodoris Greasidis]
|
||||
|
@ -1454,6 +1454,7 @@ Examples:
|
||||
$ balena device os-update 23c73a1
|
||||
$ balena device os-update 23c73a1 --version 2.101.7
|
||||
$ balena device os-update 23c73a1 --version 2.31.0+rev1.prod
|
||||
$ balena device os-update 23c73a1 --include-draft
|
||||
|
||||
### Arguments
|
||||
|
||||
@ -1467,6 +1468,10 @@ the uuid of the device to update
|
||||
|
||||
a balenaOS version
|
||||
|
||||
#### --include-draft
|
||||
|
||||
include pre-release balenaOS versions
|
||||
|
||||
#### -y, --yes
|
||||
|
||||
answer "yes" to all questions (non interactive use)
|
||||
@ -2723,6 +2728,10 @@ device type
|
||||
|
||||
select balenaOS ESR versions
|
||||
|
||||
#### --include-draft
|
||||
|
||||
include pre-release balenaOS versions
|
||||
|
||||
## os download <type>
|
||||
|
||||
Download an unconfigured OS image for the specified device type.
|
||||
|
@ -37,6 +37,7 @@ export default class DeviceOsUpdateCmd extends Command {
|
||||
'$ balena device os-update 23c73a1',
|
||||
'$ balena device os-update 23c73a1 --version 2.101.7',
|
||||
'$ balena device os-update 23c73a1 --version 2.31.0+rev1.prod',
|
||||
'$ balena device os-update 23c73a1 --include-draft',
|
||||
];
|
||||
|
||||
public static args = {
|
||||
@ -51,6 +52,12 @@ export default class DeviceOsUpdateCmd extends Command {
|
||||
public static flags = {
|
||||
version: Flags.string({
|
||||
description: 'a balenaOS version',
|
||||
exclusive: ['include-draft'],
|
||||
}),
|
||||
'include-draft': Flags.boolean({
|
||||
description: 'include pre-release balenaOS versions',
|
||||
default: false,
|
||||
exclusive: ['version'],
|
||||
}),
|
||||
yes: cf.yes,
|
||||
help: cf.help,
|
||||
@ -86,10 +93,25 @@ export default class DeviceOsUpdateCmd extends Command {
|
||||
);
|
||||
}
|
||||
|
||||
let includeDraft = options['include-draft'];
|
||||
if (!includeDraft && options.version != null) {
|
||||
const bSemver = await import('balena-semver');
|
||||
const parsedVersion = bSemver.parse(options.version);
|
||||
// When the user provides a draft version, we need to pass `includeDraft`
|
||||
// to the os.getSupportedOsUpdateVersions() since w/o it the results
|
||||
// will for sure not include the user provided version and the command
|
||||
// would return a "not in the Host OS update targets" error.
|
||||
includeDraft =
|
||||
parsedVersion != null && parsedVersion.prerelease.length > 0;
|
||||
}
|
||||
|
||||
// Get supported OS update versions
|
||||
const hupVersionInfo = await sdk.models.os.getSupportedOsUpdateVersions(
|
||||
is_of__device_type[0].slug,
|
||||
currentOsVersion,
|
||||
{
|
||||
includeDraft,
|
||||
},
|
||||
);
|
||||
if (hupVersionInfo.versions.length === 0) {
|
||||
throw new ExpectedError(
|
||||
|
@ -48,15 +48,33 @@ export default class OsVersionsCmd extends Command {
|
||||
description: 'select balenaOS ESR versions',
|
||||
default: false,
|
||||
}),
|
||||
'include-draft': Flags.boolean({
|
||||
description: 'include pre-release balenaOS versions',
|
||||
default: false,
|
||||
}),
|
||||
};
|
||||
|
||||
public async run() {
|
||||
const { args: params, flags: options } = await this.parse(OsVersionsCmd);
|
||||
|
||||
if (options['include-draft']) {
|
||||
const { warnify } = await import('../../utils/messages');
|
||||
console.error(
|
||||
warnify(stripIndent`
|
||||
Using pre-release balenaOS versions is only supported for OS updates
|
||||
and not for OS image downloads.
|
||||
`),
|
||||
);
|
||||
}
|
||||
|
||||
const { formatOsVersion, getOsVersions } = await import(
|
||||
'../../utils/cloud'
|
||||
);
|
||||
const vs = await getOsVersions(params.type, !!options.esr);
|
||||
const vs = await getOsVersions(
|
||||
params.type,
|
||||
!!options.esr,
|
||||
options['include-draft'],
|
||||
);
|
||||
|
||||
console.log(vs.map((v) => formatOsVersion(v)).join('\n'));
|
||||
}
|
||||
|
@ -200,7 +200,11 @@ async function resolveOSVersion(
|
||||
version: string,
|
||||
): Promise<string> {
|
||||
if (['menu', 'menu-esr'].includes(version)) {
|
||||
return await selectOSVersionFromMenu(deviceType, version === 'menu-esr');
|
||||
return await selectOSVersionFromMenu(
|
||||
deviceType,
|
||||
version === 'menu-esr',
|
||||
false,
|
||||
);
|
||||
}
|
||||
const { normalizeOsVersion } = await import('./normalization');
|
||||
version = normalizeOsVersion(version);
|
||||
@ -210,8 +214,9 @@ async function resolveOSVersion(
|
||||
async function selectOSVersionFromMenu(
|
||||
deviceType: string,
|
||||
esr: boolean,
|
||||
includeDraft: boolean,
|
||||
): Promise<string> {
|
||||
const vs = await getOsVersions(deviceType, esr);
|
||||
const vs = await getOsVersions(deviceType, esr, includeDraft);
|
||||
|
||||
const choices = vs.map((v) => ({
|
||||
value: v.raw_version,
|
||||
@ -233,17 +238,22 @@ async function selectOSVersionFromMenu(
|
||||
export async function getOsVersions(
|
||||
deviceType: string,
|
||||
esr: boolean,
|
||||
includeDraft: boolean,
|
||||
): Promise<SDK.OsVersion[]> {
|
||||
const sdk = getBalenaSdk();
|
||||
let slug = deviceType;
|
||||
let versions: SDK.OsVersion[] =
|
||||
await sdk.models.os.getAvailableOsVersions(slug);
|
||||
let versions: SDK.OsVersion[] = await sdk.models.os.getAvailableOsVersions(
|
||||
slug,
|
||||
{ includeDraft },
|
||||
);
|
||||
// if slug is an alias, fetch the real slug
|
||||
if (!versions.length) {
|
||||
// unalias device type slug
|
||||
slug = (await sdk.models.deviceType.get(slug, { $select: 'slug' })).slug;
|
||||
if (slug !== deviceType) {
|
||||
versions = await sdk.models.os.getAvailableOsVersions(slug);
|
||||
versions = await sdk.models.os.getAvailableOsVersions(slug, {
|
||||
includeDraft,
|
||||
});
|
||||
}
|
||||
}
|
||||
versions = versions.filter(
|
||||
|
@ -627,17 +627,10 @@ export function generateTargetState(
|
||||
};
|
||||
|
||||
opts.environment = _.merge(opts.environment, env[name]);
|
||||
// This function can be called with a subset of the
|
||||
// build tasks, when a single dockerfile has changed
|
||||
// when livepushing, so check the build task exists for
|
||||
// this composition entry (everything else in this
|
||||
// function comes from the composition which doesn't
|
||||
// change)
|
||||
let contract;
|
||||
if (name in keyedBuildTasks) {
|
||||
contract = keyedBuildTasks[name].contract;
|
||||
}
|
||||
|
||||
// This function should always be called with all the build tasks
|
||||
// so we can construct the correct target state so we don't really need
|
||||
// to check that the key exists on the `keyedBuildTasks` object
|
||||
const contract = keyedBuildTasks[name].contract;
|
||||
const task = keyedBuildTasks[name];
|
||||
|
||||
services[idx] = {
|
||||
|
@ -423,7 +423,12 @@ export class LivepushManager {
|
||||
// If we re-apply the target state, the supervisor
|
||||
// should recreate the container
|
||||
await this.api.setTargetState(
|
||||
generateTargetState(currentState, this.composition, [buildTask], {}),
|
||||
generateTargetState(
|
||||
currentState,
|
||||
this.composition,
|
||||
this.buildTasks,
|
||||
{},
|
||||
),
|
||||
);
|
||||
|
||||
await this.awaitDeviceStateSettle();
|
||||
|
597
npm-shrinkwrap.json
generated
597
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "balena-cli",
|
||||
"version": "17.4.10",
|
||||
"version": "17.5.1",
|
||||
"description": "The official balena Command Line Interface",
|
||||
"main": "./build/app.js",
|
||||
"homepage": "https://github.com/balena-io/balena-cli",
|
||||
@ -16,6 +16,7 @@
|
||||
"doc/",
|
||||
"lib/",
|
||||
"patches/",
|
||||
"!patches/**/**.dev.patch",
|
||||
"*.md",
|
||||
"npm-shrinkwrap.json",
|
||||
"oclif.manifest.json"
|
||||
@ -209,7 +210,7 @@
|
||||
"balena-image-fs": "^7.0.6",
|
||||
"balena-image-manager": "^10.0.1",
|
||||
"balena-preload": "^15.0.1",
|
||||
"balena-sdk": "^19.0.0",
|
||||
"balena-sdk": "^19.4.0",
|
||||
"balena-semver": "^2.3.0",
|
||||
"balena-settings-client": "^5.0.2",
|
||||
"balena-settings-storage": "^8.1.0",
|
||||
@ -224,7 +225,7 @@
|
||||
"denymount": "^2.3.0",
|
||||
"docker-modem": "3.0.0",
|
||||
"docker-progress": "^5.1.3",
|
||||
"dockerode": "3.3.5",
|
||||
"dockerode": "3.3.3",
|
||||
"ejs": "^3.1.6",
|
||||
"etcher-sdk": "^8.7.0",
|
||||
"event-stream": "3.3.4",
|
||||
@ -284,6 +285,6 @@
|
||||
"windosu": "^0.3.0"
|
||||
},
|
||||
"versionist": {
|
||||
"publishedAt": "2024-01-02T12:41:39.852Z"
|
||||
"publishedAt": "2024-01-31T01:05:18.677Z"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user