build/deploy/push: Remove deprecated '--convert-eol' option

Change-type: major
This commit is contained in:
Paulo Castro 2021-12-19 21:59:35 +00:00
parent 176d731f9e
commit f12f2b79ef
6 changed files with 11 additions and 50 deletions

View File

@ -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).

View File

@ -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,

View File

@ -65,7 +65,6 @@ export interface ComposeCliFlags {
'multi-dockerignore': boolean;
'noparent-check': boolean;
'registry-secrets'?: RegistrySecrets;
'convert-eol': boolean;
'noconvert-eol': boolean;
projectName?: string;
}

View File

@ -1673,10 +1673,6 @@ export const composeCliFlags: flags.Input<ComposeCliFlags> = {
'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).",

View File

@ -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,

View File

@ -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' },