Skip to content

Commit

Permalink
Manage .dockerignore (#1433)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronMoat committed Feb 7, 2024
1 parent 634350b commit 6ed693b
Show file tree
Hide file tree
Showing 10 changed files with 318 additions and 264 deletions.
7 changes: 7 additions & 0 deletions .changeset/mighty-brooms-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'skuba': minor
---

lint: Manage `.dockerignore`

skuba now manages a section of `.dockerignore` for you, ensuring that the file is up to date with the latest enhancements in skuba.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ node_modules*/
/tmp*/

.DS_Store
.npmrc
npm-debug.log
yarn-error.log
# end managed by skuba
16 changes: 15 additions & 1 deletion src/cli/__snapshots__/format.int.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ Patch skipped: Add keepAliveTimeout to server listener - no listener file found
Patch skipped: Move .npmrc out of the .gitignore managed section - no .gitignore file found
Patch skipped: Move .npmrc out of the .dockerignore managed section - no .dockerignore file found
skuba update complete.
Refreshed .eslintignore. refresh-config-files
Refreshed .gitignore. refresh-config-files
Refreshed .prettierignore. refresh-config-files
Refreshed .dockerignore. refresh-config-files
Processed skuba lints in <random>s.
ESLint
Expand Down Expand Up @@ -84,11 +87,14 @@ Patch skipped: Add keepAliveTimeout to server listener - no listener file found
Patch skipped: Move .npmrc out of the .gitignore managed section - no .gitignore file found
Patch skipped: Move .npmrc out of the .dockerignore managed section - no .dockerignore file found
skuba update complete.
Refreshed .eslintignore. refresh-config-files
Refreshed .gitignore. refresh-config-files
Refreshed .prettierignore. refresh-config-files
Refreshed .dockerignore. refresh-config-files
Processed skuba lints in <random>s.
ESLint
Expand All @@ -102,8 +108,10 @@ Prettier
Initialising Prettier...
Detected project root: <random>
Discovering files...
Discovered 9 files.
Discovered 10 files.
Formatting files...
.dockerignore
parser: -
.eslintignore
parser: -
.gitignore
Expand Down Expand Up @@ -146,11 +154,14 @@ Patch skipped: Add keepAliveTimeout to server listener - no listener file found
Patch skipped: Move .npmrc out of the .gitignore managed section - no .gitignore file found
Patch skipped: Move .npmrc out of the .dockerignore managed section - no .dockerignore file found
skuba update complete.
Refreshed .eslintignore. refresh-config-files
Refreshed .gitignore. refresh-config-files
Refreshed .prettierignore. refresh-config-files
Refreshed .dockerignore. refresh-config-files
Processed skuba lints in <random>s.
ESLint
Expand Down Expand Up @@ -181,11 +192,14 @@ Patch skipped: Add keepAliveTimeout to server listener - no listener file found
Patch skipped: Move .npmrc out of the .gitignore managed section - no .gitignore file found
Patch skipped: Move .npmrc out of the .dockerignore managed section - no .dockerignore file found
skuba update complete.
Refreshed .eslintignore. refresh-config-files
Refreshed .gitignore. refresh-config-files
Refreshed .prettierignore. refresh-config-files
Refreshed .dockerignore. refresh-config-files
Processed skuba lints in <random>s.
ESLint
Expand Down
4 changes: 3 additions & 1 deletion src/cli/__snapshots__/lint.int.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ ESLint │ ○ d.js
Prettier │ Initialising Prettier...
Prettier │ Detected project root: <random>
Prettier │ Discovering files...
Prettier │ Discovered 9 files.
Prettier │ Discovered 10 files.
Prettier │ Linting files...
Prettier │ .dockerignore
Prettier │ parser: -
Prettier │ .eslintignore
Prettier │ parser: -
Prettier │ .gitignore
Expand Down
8 changes: 6 additions & 2 deletions src/cli/configure/upgrade/patches/7.3.1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Patches } from '../..';
import { tryPatchRenovateConfig } from '../../../patchRenovateConfig';

import { tryAddEmptyExports } from './addEmptyExports';
import { tryMoveNpmrcOutOfGitignoreManagedSection } from './moveNpmrcOutOfGitignoreManagedSection';
import { tryMoveNpmrcOutOfIgnoreManagedSection } from './moveNpmrcOutOfIgnoreManagedSection';
import { tryPatchDockerfile } from './patchDockerfile';
import { tryPatchServerListener } from './patchServerListener';

Expand All @@ -25,7 +25,11 @@ export const patches: Patches = [
description: 'Add keepAliveTimeout to server listener',
},
{
apply: tryMoveNpmrcOutOfGitignoreManagedSection,
apply: tryMoveNpmrcOutOfIgnoreManagedSection('.gitignore'),
description: 'Move .npmrc out of the .gitignore managed section',
},
{
apply: tryMoveNpmrcOutOfIgnoreManagedSection('.dockerignore'),
description: 'Move .npmrc out of the .dockerignore managed section',
},
];

This file was deleted.

0 comments on commit 6ed693b

Please sign in to comment.