phoenixctms / ctsms

Phoenix CTMS - the ultimative CTMS/PRS/CDMS.
http://www.phoenixctms.org
GNU Lesser General Public License v2.1
56 stars 35 forks source link

Prepare for cross platform development #20

Closed laborg closed 5 years ago

laborg commented 5 years ago

To ease cross platform development (windows/linux) .gitattributes should be used in the repo.

Following: https://git-scm.com/docs/gitattributes the .gitattributes file should look like this

# template from https://github.com/alexkaratarakis/gitattributes/blob/master/Java.gitattributes

# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

# These files are text and should be normalized (Convert crlf => lf)
*.css           text
*.df            text
*.htm           text
*.html          text
*.java          text
*.js            text
*.json          text
*.jsp           text
*.jspf          text
*.jspx          text
*.properties    text
*.sh            text
*.tld           text
*.txt           text
*.tag           text
*.tagx          text
*.xml           text
*.yml           text

# Added to template
*.xhtml         text
*.md            text
*.sql           text
*.uml           text

# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class         binary
*.dll           binary
*.ear           binary
*.gif           binary
*.ico           binary
*.jar           binary
*.jpg           binary
*.jpeg          binary
*.png           binary
*.so            binary
*.war           binary

and then renormalize all files:

git add --renormalize . 
git status # check changed files
git commit -m "fix line endings and introduce .gitattributes"

I've tested the change on a branch in my fork: https://github.com/laborg/ctsms/tree/lineendings . It compiles and runs without problems.

rkrenn commented 5 years ago

thxalot, i tested the .xmi export and androMDA run on windows.

after the explicit normalization done in https://github.com/phoenixctms/ctsms/commit/cd06f8c9116f0e82cf346919224b2541d2e25f83 , the numer of renormalized files on my env reduced a lot already. dynamic compilation in eclipse still works.

would you like add excluding text line ending normalization in a PR for:

i'm not to sure about whether to apply normalization .vsl (especially the mail templates in core/main\resources folder) and .sql in general, even if renormalize does not shows a delta nowadays. *.vsl should be added to the text files.

laborg commented 5 years ago

I've updated .gitattributes and added the PR