I am trying to use (cloud) bitbucket's pipelines to automatically build my angular app. One of the tslint settings we have in our project is to enforce that line breaks are CRLF.
However, when I try to do a build with pipelines, we get a tslint error for every single line of our code saying that it expected line endings to be CRLF.
Since we don't see that anywhere else on any of our developer's computers, I am guessing that pipelines itself has their git config core.autocrlf
set to false
.
Also, I already have a .gitattributes file with the contents:
text eol=crlf
What can I specify in my bitbucket-pipelines.yml
to tell pipelines to not mess with my line endings?
Thanks for the answer. I asked the same question on StackOverflow and got an answer that works for me. Essentially, the answer is to use the `.gitattributes` file and specify `text eol=crlf`.
I had that set up previously, but the trick is that it doesn't really work unless you explicitly set the file type (which, in retrospect, makes sense). So, for my typescript files (which were the problem for me), I have this entry in my .gitattributes file:
*.ts text eol=crlf
Hi Patrick,
I suggest you open a feature request relating to this specific issue. As we have no built-in way to configure the line endings, on clone, at the moment.
As a workaround you'll need to manually change the line endings as part of you build. This bash program, unix2dos, here seems to be useful in this case (I haven't tried it out, so you'll need to report back if it works or not).
There are other work arounds suggested here: https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-lf-in-a-bash-script
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.