Browse Source

build: on windows, ignore linux packaging

Daniel Lee 8 years ago
parent
commit
91ad260517
2 changed files with 9 additions and 2 deletions
  1. 1 0
      appveyor.yml
  2. 8 2
      build.go

+ 1 - 0
appveyor.yml

@@ -29,6 +29,7 @@ install:
 
 build_script:
   - go run build.go build
+  - go test -v ./pkg/...
   - grunt release
   - go run build.go sha-dist
   - cp dist/* .

+ 8 - 2
build.go

@@ -95,7 +95,9 @@ func main() {
 
 		case "package":
 			grunt(gruntBuildArg("release")...)
-			createLinuxPackages()
+      if runtime.GOOS != "windows" {
+			  createLinuxPackages()
+      }
 
 		case "pkg-rpm":
 			grunt(gruntBuildArg("release")...)
@@ -345,7 +347,11 @@ func ChangeWorkingDir(dir string) {
 }
 
 func grunt(params ...string) {
-	runPrint("./node_modules/.bin/grunt", params...)
+  if runtime.GOOS == "windows" {
+    runPrint(`.\node_modules\.bin\grunt`, params...)
+  } else {
+    runPrint("./node_modules/.bin/grunt", params...)
+  }
 }
 
 func gruntBuildArg(task string) []string {