aboutsummaryrefslogtreecommitdiff
path: root/src/all.bat
AgeCommit message (Collapse)Author
2020-06-08all: treat all files as binary, but check in .bat with CRLFDmitri Shuralyov
This is a followup to CL 96495. It should be simpler and more robust to achieve .bat files having CRLF line endings by treating it as a binary file, like all other files, and checking it in with the desired CRLF line endings. A test is used to check the entire Go tree, short of directories starting with "." and named "testdata", for any .bat files that have anything other than strict CRLF line endings. This will help catch any accidental modifications to existing .bat files or check ins of new .bat files. Importantly, this is compatible with how Gerrit serves .tar.gz files, making it so that CRLF line endings are preserved. The Go project is supported on many different environments, some of which may have limited git implementations available, or none at all. Relying on fewer git features and special rules makes it easier to have confidence in the exact content of all files. Additionally, Go development started in Subversion, moved to Perforce, then Mercurial, and now uses Git.¹ Reducing its reliance on git-specific features will help if there will be another transition in the project's future. There are only 5 .bat files in the entire Go source tree, so a new one being added is a rare event, and we prefer to do things in Go instead. We still have the option of improving the experience for developers by adding a pre-commit converter for .bat files to the git-codereview tool. ¹ https://groups.google.com/d/msg/golang-dev/sckirqOWepg/YmyT7dWJiocJ Fixes #39391. For #37791. Change-Id: I6e202216322872f0307ac96f1b8d3f57cb901e6b Reviewed-on: https://go-review.googlesource.com/c/go/+/236437 Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-03-22build: force all Windows batch files to CRLFGiovanni Bajo
Batch files should use CRLF endings. LF endings mostly work but in some situations they cause random errors like goto commands failing for mysterious reasons. See golang.org/issue/37791 for more information. Next CL triggered one of such bug (a label was not being recognized), so prepare for it by converting to CRLF. This CL also touches all existing batch files to force git to update the line endings (unfortunately, changing .gitattributes only has effect next time the file is checked out or modified). Fixes #37791 Updates #9281 Change-Id: I6f9a114351cb7ac9881914400aa210c930eb8cc1 Reviewed-on: https://go-review.googlesource.com/c/go/+/96495 Run-TryBot: Giovanni Bajo <rasky@develer.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2013-03-25all.bat,make.bat,run.bat: make these work even when directory has space in itAlex Brainman
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7510048
2012-09-20src/all.bat: fix bannerShenghou Ma
we need to restore %PATH% before calling "dist banner", so that it could suggest the user to add %GOROOT%/bin to %PATH% if necessary. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6525049
2012-09-13build: print go banner before restoring windows PATHBrad Fitzpatrick
R=golang-dev, r CC=golang-dev https://golang.org/cl/6492117
2012-06-06build: restore PATH before "dist banner"Shenghou Ma
Fixes #3699. R=golang-dev, r, rsc CC=golang-dev https://golang.org/cl/6272048
2012-02-16build: use setlocal in run.batAlex Brainman
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5672061
2012-02-16build: keep environment variable changes local during Windows buildAlex Brainman
R=bradfitz, rsc CC=golang-dev https://golang.org/cl/5673048
2012-02-13build: fix windows buildRuss Cox
TBR=golang-dev CC=golang-dev https://golang.org/cl/5656051
2012-02-10builder: set $GOBUILDEXIT for WindowsRuss Cox
Actually %GOBUILDEXIT% I suppose. R=golang-dev CC=golang-dev https://golang.org/cl/5651058
2012-02-10all.bat: report error code back to the gobuilderAlex Brainman
not sure that it will work, but. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5649051
2012-02-04build: dist-based build for windowsRuss Cox
R=golang-dev, bradfitz, iant, alex.brainman, go.peter.90 CC=golang-dev https://golang.org/cl/5630047