forked from zishang520/socket.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
39 lines (31 loc) · 768 Bytes
/
make.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@echo OFF
set "args=%*"
pushd "%~dp0"
setlocal ENABLEDELAYEDEXPANSION
set GOPATH="%~dp0vendor"
rem Set the GOPROXY environment variable
Set GOPROXY=https://goproxy.io,direct
rem set http_proxy=socks5://127.0.0.1:1080
rem set https_proxy=%http_proxy%
if /i "%args%"=="default" goto %args%
if /i "%args%"=="deps" goto %args%
if /i "%args%"=="fmt" goto %args%
if /i "%args%"=="clean" goto %args%
if /i "%args%"=="test" goto %args%
goto default
:default
GOTO :EOF
:deps
CALL go mod tidy -v
rem CALL go mod vendor -v
GOTO :EOF
:fmt
CALL go fmt -mod=mod ./...
GOTO :EOF
:clean
CALL go clean -mod=mod -v -r ./...
GOTO :EOF
:test
CALL go clean -testcache
CALL go test -race -cover -covermode=atomic -mod=mod ./...
GOTO :EOF