github.com/getgauge/gauge@v1.6.9/build/run.ps1 (about) 1 # ---------------------------------------------------------------- 2 # Copyright (c) ThoughtWorks, Inc. 3 # Licensed under the Apache License, Version 2.0 4 # See LICENSE.txt in the project root for license information. 5 # ---------------------------------------------------------------- 6 7 param ( 8 [Parameter(Mandatory=$true)][string]$task = "build" 9 ) 10 11 function checkLasterror { 12 if ($LastExitCode -ne 0) { 13 exit $LastExitCode 14 } 15 } 16 17 function build { 18 & go run build/make.go 19 checkLasterror 20 } 21 22 function test { 23 & go test .\... -v 24 checkLasterror 25 } 26 27 switch ($task) { 28 "test" { 29 test 30 } 31 Default { 32 build 33 } 34 }