Skip to content

Commit

Permalink
Introduce end-of-line normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Håkansson committed Oct 23, 2015
1 parent e23f4ec commit c701851
Show file tree
Hide file tree
Showing 6 changed files with 460 additions and 406 deletions.
74 changes: 64 additions & 10 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,64 @@
* text=auto !eol
/.project -text
ant-build/resources/trang.jar -text
/build.xml -text
/default.css -text
examples/example1.obfl -text
/markup.js -text
/obfl-evaluation-language.html -text svneol=unset#text/plain
/obfl-specification.html -text svneol=unset#text/plain
validation/obfl.dtd -text
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.adoc text
*.bat eol=crlf
*.bnd text
*.bndrun text
*.classpath text
*.css text
*.csv text
*.df text
*.dic eol=lf
*.dtd text
*.ent text
*.gradle text
*.htm text
*.html text
*.java text
*.js text
*.json text
*.jsp text
*.jspf text
*.md text
*.mustache text
*.obfl text
*.pef text
*.prefs text
*.project text
*.properties text
*.rng text
*.sch text
*.sh eol=lf
*.sql text
*.svg text
*.tab text
*.tex eol=lf
*.tld text
*.tsv text
*.textile text
*.txt text
*.xml text
*.xsd text
*.xsl text
*.xslt text

# 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
*.ttf binary
*.war binary
22 changes: 11 additions & 11 deletions .project
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OBFL</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OBFL</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
114 changes: 57 additions & 57 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="buildSite">
<description>Buildfile for this project</description>

<property name="release-name" value="obfl"/>
<property name="release-version" value="draft"/>

<property name="ant-build.dir" value="${basedir}/ant-build"/>
<property name="ant-output.dir" value="${ant-build.dir}/output"/>
<property name="dist.dir" value="${ant-output.dir}/site"/>

<property name="dist.zip" value="${dist.dir}/${release-name}.zip"/>

<patternset id="dist.patternset">
<include name="**/*.*"/>
<exclude name="build.xml"/>
<exclude name="ant-build/**/*.*"/>
<exclude name=".project"/>
</patternset>


<!-- - - - - - - - - - - - - - - - - -
target: emptyDistDir
- - - - - - - - - - - - - - - - - -->
<target name="createDistDir">
<delete dir="${dist.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>

<target name="buildSite" depends="createDistDir" description="Builds distribution">
<copy todir="${dist.dir}">
<fileset dir="${basedir}">
<patternset refid="dist.patternset"/>
</fileset>
</copy>
<java jar="${ant-build.dir}/resources/trang.jar" fork="true">
<arg value="validation/obfl.rng" />
<arg value="${dist.dir}/validation/obfl.xsd" />
</java>
<!--
<java jar="${ant-build.dir}/resources/trang.jar" fork="true">
<arg value="validation/obfl.rng" />
<arg value="${dist.dir}/validation/obfl.dtd" />
</java> -->
<java jar="${ant-build.dir}/resources/trang.jar" fork="true">
<arg value="validation/obfl.rng" />
<arg value="${dist.dir}/validation/obfl.rnc" />
</java>
<zip destfile="${ant-output.dir}/temp.zip">
<zipfileset dir="${dist.dir}" prefix="">
<patternset refid="dist.patternset"/>
</zipfileset>
</zip>
<move file="${ant-output.dir}/temp.zip" tofile="${dist.zip}"/>
</target>

</project>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="buildSite">
<description>Buildfile for this project</description>

<property name="release-name" value="obfl"/>
<property name="release-version" value="draft"/>

<property name="ant-build.dir" value="${basedir}/ant-build"/>
<property name="ant-output.dir" value="${ant-build.dir}/output"/>
<property name="dist.dir" value="${ant-output.dir}/site"/>

<property name="dist.zip" value="${dist.dir}/${release-name}.zip"/>

<patternset id="dist.patternset">
<include name="**/*.*"/>
<exclude name="build.xml"/>
<exclude name="ant-build/**/*.*"/>
<exclude name=".project"/>
</patternset>


<!-- - - - - - - - - - - - - - - - - -
target: emptyDistDir
- - - - - - - - - - - - - - - - - -->
<target name="createDistDir">
<delete dir="${dist.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>

<target name="buildSite" depends="createDistDir" description="Builds distribution">
<copy todir="${dist.dir}">
<fileset dir="${basedir}">
<patternset refid="dist.patternset"/>
</fileset>
</copy>
<java jar="${ant-build.dir}/resources/trang.jar" fork="true">
<arg value="validation/obfl.rng" />
<arg value="${dist.dir}/validation/obfl.xsd" />
</java>
<!--
<java jar="${ant-build.dir}/resources/trang.jar" fork="true">
<arg value="validation/obfl.rng" />
<arg value="${dist.dir}/validation/obfl.dtd" />
</java> -->
<java jar="${ant-build.dir}/resources/trang.jar" fork="true">
<arg value="validation/obfl.rng" />
<arg value="${dist.dir}/validation/obfl.rnc" />
</java>
<zip destfile="${ant-output.dir}/temp.zip">
<zipfileset dir="${dist.dir}" prefix="">
<patternset refid="dist.patternset"/>
</zipfileset>
</zip>
<move file="${ant-output.dir}/temp.zip" tofile="${dist.zip}"/>
</target>

</project>
Loading

0 comments on commit c701851

Please sign in to comment.