Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(travis): add windows #5

Open
wants to merge 2 commits into
base: master
from

Conversation

@SukkaW
Copy link
Member

commented Oct 4, 2019

No description provided.

@SukkaW

This comment has been minimized.

Copy link
Member Author

commented Oct 4, 2019

The test on windows build failed due to CRLF issue.

https://travis-ci.community/t/provide-git-config-forcrlf/3307

@SukkaW SukkaW requested a review from curbengh Oct 5, 2019
@tomap

This comment has been minimized.

Copy link

commented Oct 6, 2019

The test on windows build failed due to CRLF issue.

https://travis-ci.community/t/provide-git-config-forcrlf/3307

Can't we fix the CRLF issue in the git sources instead?
Or ignore this eslint rule?

- if [[ $TRAVIS_OS_NAME == "windows" ]]; then
git config core.autocrlf false && git add --renormalize . && git reset --hard;
fi
Comment for lines +14  – +16

This comment has been minimized.

Copy link
@SukkaW

SukkaW Oct 6, 2019

Author Member

@tomap

Travis enable core.autocrlf = true during Git for WIndows installation by default and can not be diabled (at least for now). Which means during git clone in build process, all LF endings will automatically change to CRLF.

I have fixed this problem using this and eslint is now happy.

This comment has been minimized.

Copy link
@tomap

tomap Oct 8, 2019

I found a better solution which is suggested here:
https://github.community/t5/GitHub-Actions/git-config-core-autocrlf-should-default-to-false/td-p/30445
Which is to add a .gitattributes file
which I did here: hexojs/hexo-cli#121

This comment has been minimized.

Copy link
@curbengh

curbengh Oct 10, 2019

Or run eslint on linux only, I don't think running eslint again on windows is useful. does the following works?

- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
    npm run eslint
  fi

This comment has been minimized.

Copy link
@SukkaW

SukkaW Oct 10, 2019

Author Member

@tomap auto crlf is friendly for human, it is just not useful to the machine like CI.

@curbengh I think it will be fine!

@curbengh curbengh added this to Pull requests in Travis Windows Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Travis Windows
Pull requests
3 participants
You can’t perform that action at this time.