Skip to content

Commit

Permalink
Use CRLF as EOL (#3566)
Browse files Browse the repository at this point in the history
* Use CRLF as EOL

GenerateMetadataFromCSUnitTest.cs and possibly more assume their EOLs are
CRLF.

* Limit the length of revision string

The release note of Git 2.11.0 says:
> * The default abbreviation length, which has historically been 7, now
>   scales as the repository grows, using the approximate number of
>   objects in the repository and a bit of math around the birthday
>   paradox. The logic suggests to use 12 hexdigits for the Linux kernel,
>   and 9 to 10 for Git itself.

However, special version string cannot include too long values. This change
limits the length to 7, the number traditionally used.
  • Loading branch information
akihikodaki authored and superyyrrzz committed Nov 12, 2018
1 parent 9f9b08e commit 17269d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
* text=auto eol=crlf
*.sh eol=lf
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -34,7 +34,6 @@ target/
*.sln.ide
*.cache
*.sln.metaproj
.gitattributes
.settings
log.txt
debugSettings.json
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Expand Up @@ -136,7 +136,7 @@ if ($prod -eq $true) {
$assemblyVersion = (($version + '0') -join '.').Substring(1)
$assemblyFileVersion = (($version + $revision) -join '.').Substring(1)
if ($branch -ne $releaseBranch) {
$abbrev = $commitInfo[2]
$abbrev = $commitInfo[2].Substring(0, 7)
$packageVersion = ((($version -join '.'), "b", $revision, $abbrev) -join '-').Substring(1)
}
else {
Expand Down

0 comments on commit 17269d7

Please sign in to comment.