mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech: removes unused code
This commit is contained in:
16
build.go
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()
|
||||
|
||||
Reference in New Issue
Block a user