[go: up one dir, main page]

blob: 6688b41e5e2c9d416235659a73f2aa0345ce1131 [file] [log] [blame]
Dmitri Shuralyovee379d22020-06-04 00:35:09 -04001:: Copyright 2012 The Go Authors. All rights reserved.
2:: Use of this source code is governed by a BSD-style
3:: license that can be found in the LICENSE file.
4
5@echo off
6
7setlocal
8
9set GOBUILDFAIL=0
10
11go tool dist env -w -p >env.bat
12if errorlevel 1 goto fail
Yasuhiro Matsumotoc4c9c802022-05-13 00:22:11 +090013call .\env.bat
Dmitri Shuralyovee379d22020-06-04 00:35:09 -040014del env.bat
15echo.
16
17if exist %GOTOOLDIR%\dist.exe goto distok
18echo cannot find %GOTOOLDIR%\dist; nothing to clean
19goto fail
20:distok
21
22"%GOBIN%\go" clean -i std
23"%GOBIN%\go" tool dist clean
24"%GOBIN%\go" clean -i cmd
25
26goto end
27
28:fail
29set GOBUILDFAIL=1
30
31:end
32if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%