Skip to content

Commit

Permalink
Avoid "git : warning: in the working copy of '<file>', LF will be rep…
Browse files Browse the repository at this point in the history
…laced by CRLF the next time Git touches it" (#10648)

Co-authored-by: Gerhard Olsson <6248932+gerhardol@users.noreply.github.com>
(cherry picked from commit 67bda78)
  • Loading branch information
RussKie authored and mstv committed Feb 11, 2023
1 parent 9600dc9 commit 962a0b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ build_script:
$gitCommit = $(git rev-parse --short $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT)
$buildArgs += " /p:GitCommit=$gitCommit /p:GitSha=$($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT)"
}
- ps: |
# add to index, to adjust crlf configured in .gitattributes
git -c core.autocrlf=false add -A
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- ps: |
# build VC++
dotnet build .\scripts\native.proj -c Release --verbosity q --nologo /bl:.\artifacts\log\native.binlog
Expand All @@ -82,6 +78,9 @@ build_script:
$cmd = "dotnet build -c Release --verbosity q --nologo /bl:.\artifacts\log\build.binlog $buildArgs"
Invoke-Expression $cmd
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- ps: |
# We are done with the build, reset all pending changes
git reset --hard HEAD
- ps: |
# Verify that new strings (if any) have been processed and ready for localisation
Push-Location .\GitExtensions
Expand All @@ -93,7 +92,7 @@ build_script:
# to run your custom scripts instead of automatic tests
test_script:
- ps: |
dotnet test -c Release --no-restore --nologo --verbosity q --test-adapter-path:. --logger:Appveyor --logger:trx /bl:.\artifacts\log\tests.binlog
dotnet test -c Release --no-restore --no-build --nologo --verbosity q --test-adapter-path:. --logger:Appveyor --logger:trx /bl:.\artifacts\log\tests.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Expand Down
6 changes: 3 additions & 3 deletions scripts/set_version_to.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
data[1] = args.text
line = '"'.join(data)
o += line
outfile = open(filename, "w")
outfile = open(filename, "w", newline='\n')
outfile.writelines(o)

filename = "..\GitExtensionsShellEx\GitExtensionsShellEx.rc"
Expand All @@ -79,7 +79,7 @@
data[1] = '"' + args.text + '"\n'
line = ', '.join(data)
o += line
outfile = open(filename, "w")
outfile = open(filename, "w", newline='\n')
outfile.writelines(o)

filename = "..\GitExtSshAskPass\SshAskPass.rc2"
Expand All @@ -104,7 +104,7 @@
data[1] = '"' + args.text + '"\n'
line = ', '.join(data)
o += line
outfile = open(filename, "w")
outfile = open(filename, "w", newline='\n')
outfile.writelines(o)

for i in range(1, len(verSplitted)):
Expand Down

0 comments on commit 962a0b3

Please sign in to comment.