Add .gitattributes to check out with the correct line-ending on windows

Change-type: patch
This commit is contained in:
Pagan Gazzard 2020-02-06 13:10:28 +00:00
parent 324a406e7f
commit 467afb3de6
4 changed files with 17 additions and 5 deletions

11
.gitattributes vendored Normal file
View File

@ -0,0 +1,11 @@
# Set all files to use line feed endings (since we can't match only ones without an extension)
* eol=lf
# And then reset all the files with extensions back to default
*.* -eol
*.sh text eol=lf
# lf for the docs as it's auto-generated and will otherwise trigger an uncommited error on windows
doc/cli.markdown text eol=lf
# crlf for the for the windows-crlf test file
tests/test-data/projects/no-docker-compose/basic/src/windows-crlf.sh eol=crlf

View File

@ -306,6 +306,7 @@ export async function catchUncommitted(): Promise<void> {
'catch-uncommitted',
'--catch-no-git',
'--skip-node-versionbot-changes',
'--ignore-space-at-eol',
]);
}
}

6
npm-shrinkwrap.json generated
View File

@ -2724,9 +2724,9 @@
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"catch-uncommitted": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/catch-uncommitted/-/catch-uncommitted-1.4.0.tgz",
"integrity": "sha512-xrLMj7iYrMc3TXSLsRO9tTxfcWEUICGCDZm+WI40WznxLp/+mVE8v4RxipC/ufL5TDfAYAe1ppu5VURBN990SQ==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/catch-uncommitted/-/catch-uncommitted-1.5.0.tgz",
"integrity": "sha512-QYQ0L9+i8AgpCnGWyhn8K1OUBJ0h5MVE/dBdnWsHSk4Kr6JdPoHTQcSRIk7aWiXTveU1OxJcoF8hKTC/G3XtjQ==",
"dev": true
},
"chai": {

View File

@ -54,7 +54,7 @@
"test": "mocha --timeout 6000 -r ts-node/register/transpile-only \"tests/**/*.spec.ts\"",
"test:fast": "npm run build:fast && npm run test",
"catch-uncommitted": "ts-node --transpile-only -P automation/tsconfig.json automation/run.ts catch-uncommitted",
"ci": "npm run test && catch-uncommitted",
"ci": "npm run test && npm run catch-uncommitted",
"watch": "gulp watch",
"prettify": "prettier --write \"{lib,tests,automation,typings}/**/*.js\" --config ./node_modules/resin-lint/config/.prettierrc",
"lint": "resin-lint lib/ tests/ && resin-lint --typescript --fix automation/ lib/ typings/ tests/",
@ -127,7 +127,7 @@
"@types/tar-stream": "1.6.0",
"@types/through2": "2.0.33",
"@types/which": "^1.3.2",
"catch-uncommitted": "^1.4.0",
"catch-uncommitted": "^1.5.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"ent": "^2.2.0",