Jelajahi Sumber

tech: removes unused code

bergquist 7 tahun lalu
induk
melakukan
8e9b3507c5
1 mengubah file dengan 0 tambahan dan 16 penghapusan
  1. 0 16
      build.go

+ 0 - 16
build.go

@@ -49,8 +49,6 @@ func main() {
 
 	ensureGoPath()
 
-	verifyGitRepoIsClean()
-
 	flag.StringVar(&goarch, "goarch", runtime.GOARCH, "GOARCH")
 	flag.StringVar(&goos, "goos", runtime.GOOS, "GOOS")
 	flag.StringVar(&gocc, "cc", "", "CC")
@@ -325,20 +323,6 @@ func createPackage(options linuxPackageOptions) {
 	runPrint("fpm", append([]string{"-t", options.packageType}, args...)...)
 }
 
-func verifyGitRepoIsClean() {
-	rs, err := runError("git", "ls-files", "--modified")
-	if err != nil {
-		log.Fatalf("Failed to check if git tree was clean, %v, %v\n", string(rs), err)
-		return
-	}
-	count := len(string(rs))
-	if count > 0 {
-		log.Fatalf("Git repository has modified files, aborting")
-	}
-
-	log.Println("Git repository is clean")
-}
-
 func ensureGoPath() {
 	if os.Getenv("GOPATH") == "" {
 		cwd, err := os.Getwd()