From f12f2b79efbe6349b68353b86e668a3957926718 Mon Sep 17 00:00:00 2001 From: Paulo Castro Date: Sun, 19 Dec 2021 21:59:35 +0000 Subject: [PATCH] build/deploy/push: Remove deprecated '--convert-eol' option Change-type: major --- docs/balena-cli.md | 8 -------- lib/commands/push.ts | 12 ------------ lib/utils/compose-types.d.ts | 1 - lib/utils/compose_ts.ts | 4 ---- tests/commands/build.spec.ts | 34 ++++++++++------------------------ tests/commands/push.spec.ts | 2 +- 6 files changed, 11 insertions(+), 50 deletions(-) diff --git a/docs/balena-cli.md b/docs/balena-cli.md index baf1a3b5..30a24c38 100644 --- a/docs/balena-cli.md +++ b/docs/balena-cli.md @@ -3028,10 +3028,6 @@ Disable project validation check of 'docker-compose.yml' file in parent folder Path to a YAML or JSON file with passwords for a private Docker registry -#### -l, --convert-eol - -No-op and deprecated since balena CLI v12.0.0 - #### --noconvert-eol Don't convert line endings from CRLF (Windows format) to LF (Unix format). @@ -3256,10 +3252,6 @@ Disable project validation check of 'docker-compose.yml' file in parent folder Path to a YAML or JSON file with passwords for a private Docker registry -#### -l, --convert-eol - -No-op and deprecated since balena CLI v12.0.0 - #### --noconvert-eol Don't convert line endings from CRLF (Windows format) to LF (Unix format). diff --git a/lib/commands/push.ts b/lib/commands/push.ts index d66ef11c..e1b61d99 100644 --- a/lib/commands/push.ts +++ b/lib/commands/push.ts @@ -22,7 +22,6 @@ import { getBalenaSdk, stripIndent } from '../utils/lazy'; import { dockerignoreHelp, registrySecretsHelp } from '../utils/messages'; import type { BalenaSDK } from 'balena-sdk'; import { ExpectedError, instanceOf } from '../errors'; -import { isV13 } from '../utils/version'; import { RegistrySecrets } from 'resin-multibuild'; import { lowercaseIfSlug } from '../utils/normalization'; import { @@ -52,7 +51,6 @@ interface FlagsDef { service?: string[]; system: boolean; env?: string[]; - 'convert-eol'?: boolean; 'noconvert-eol': boolean; 'multi-dockerignore': boolean; 'release-tag'?: string[]; @@ -216,16 +214,6 @@ export default class PushCmd extends Command { `, multiple: true, }), - ...(isV13() - ? {} - : { - 'convert-eol': flags.boolean({ - description: 'No-op and deprecated since balena CLI v12.0.0', - char: 'l', - hidden: true, - default: false, - }), - }), 'noconvert-eol': flags.boolean({ description: `Don't convert line endings from CRLF (Windows format) to LF (Unix format).`, default: false, diff --git a/lib/utils/compose-types.d.ts b/lib/utils/compose-types.d.ts index 63521c6e..5b27abb3 100644 --- a/lib/utils/compose-types.d.ts +++ b/lib/utils/compose-types.d.ts @@ -65,7 +65,6 @@ export interface ComposeCliFlags { 'multi-dockerignore': boolean; 'noparent-check': boolean; 'registry-secrets'?: RegistrySecrets; - 'convert-eol': boolean; 'noconvert-eol': boolean; projectName?: string; } diff --git a/lib/utils/compose_ts.ts b/lib/utils/compose_ts.ts index c150b6ad..3d374afc 100644 --- a/lib/utils/compose_ts.ts +++ b/lib/utils/compose_ts.ts @@ -1673,10 +1673,6 @@ export const composeCliFlags: flags.Input = { 'Path to a YAML or JSON file with passwords for a private Docker registry', char: 'R', }), - 'convert-eol': flags.boolean({ - description: 'No-op and deprecated since balena CLI v12.0.0', - char: 'l', - }), 'noconvert-eol': flags.boolean({ description: "Don't convert line endings from CRLF (Windows format) to LF (Unix format).", diff --git a/tests/commands/build.spec.ts b/tests/commands/build.spec.ts index ad78abb9..ac262c9c 100644 --- a/tests/commands/build.spec.ts +++ b/tests/commands/build.spec.ts @@ -126,16 +126,9 @@ describe('balena build', function () { ]; if (isWindows) { const fname = path.join(projectPath, 'src', 'windows-crlf.sh'); - if (isWindows) { - expectedResponseLines.push( - `[Info] Converting line endings CRLF -> LF for file: ${fname}`, - ); - } else { - expectedResponseLines.push( - `[Warn] CRLF (Windows) line endings detected in file: ${fname}`, - '[Warn] Windows-format line endings were detected in some files. Consider using the `--convert-eol` option.', - ); - } + expectedResponseLines.push( + `[Info] Converting line endings CRLF -> LF for file: ${fname}`, + ); } docker.expectGetInfo({}); docker.expectGetManifestBusybox(); @@ -189,16 +182,9 @@ describe('balena build', function () { ]; if (isWindows) { const fname = path.join(projectPath, 'src', 'windows-crlf.sh'); - if (isWindows) { - expectedResponseLines.push( - `[Info] Converting line endings CRLF -> LF for file: ${fname}`, - ); - } else { - expectedResponseLines.push( - `[Warn] CRLF (Windows) line endings detected in file: ${fname}`, - '[Warn] Windows-format line endings were detected in some files. Consider using the `--convert-eol` option.', - ); - } + expectedResponseLines.push( + `[Info] Converting line endings CRLF -> LF for file: ${fname}`, + ); } docker.expectGetInfo({}); docker.expectGetManifestBusybox(); @@ -312,7 +298,7 @@ describe('balena build', function () { } }); - it('should create the expected tar stream (single container, --[no]convert-eol, --multi-dockerignore)', async () => { + it('should create the expected tar stream (single container, --noconvert-eol, --multi-dockerignore)', async () => { const projectPath = path.join(projectsPath, 'no-docker-compose', 'basic'); const expectedFiles: ExpectedTarStreamFiles = { 'src/.dockerignore': { fileSize: 16, type: 'file' }, @@ -443,7 +429,7 @@ describe('balena build', function () { docker.expectGetManifestNucAlpine(); docker.expectGetManifestBusybox(); await testDockerBuildStream({ - commandLine: `build ${projectPath} --deviceType nuc --arch amd64 --convert-eol -B COMPOSE_ARG=A -B barg=b --cache-from my/img1,my/img2`, + commandLine: `build ${projectPath} --deviceType nuc --arch amd64 -B COMPOSE_ARG=A -B barg=b --cache-from my/img1,my/img2`, dockerMock: docker, expectedFilesByService, expectedQueryParamsByService, @@ -526,7 +512,7 @@ describe('balena build', function () { docker.expectGetManifestNucAlpine(); await testDockerBuildStream({ - commandLine: `build ${projectPath} --deviceType nuc --arch amd64 --convert-eol -m`, + commandLine: `build ${projectPath} --deviceType nuc --arch amd64 -m`, dockerMock: docker, expectedFilesByService, expectedQueryParamsByService, @@ -611,7 +597,7 @@ describe('balena build', function () { docker.expectGetManifestNucAlpine(); await testDockerBuildStream({ - commandLine: `build ${projectPath} --deviceType nuc --arch amd64 --convert-eol -m --tag ${tag} --projectName ${projectName}`, + commandLine: `build ${projectPath} --deviceType nuc --arch amd64 -m --tag ${tag} --projectName ${projectName}`, dockerMock: docker, expectedFilesByService, expectedQueryParamsByService, diff --git a/tests/commands/push.spec.ts b/tests/commands/push.spec.ts index 89a815e6..52fd3ccf 100644 --- a/tests/commands/push.spec.ts +++ b/tests/commands/push.spec.ts @@ -190,7 +190,7 @@ describe('balena push', function () { }); }); - it('should create the expected tar stream (single container, --[no]convert-eol)', async () => { + it('should create the expected tar stream (single container, --noconvert-eol)', async () => { const projectPath = path.join(projectsPath, 'no-docker-compose', 'basic'); const expectedFiles: ExpectedTarStreamFiles = { 'src/.dockerignore': { fileSize: 16, type: 'file' },