From a2ed0b15da6622fcc51a52466552ca3d9b574c67 Mon Sep 17 00:00:00 2001 From: bergquist Date: Mon, 28 May 2018 10:39:42 +0200 Subject: [PATCH] build: fixes broken path for bra run removes os and arch from binary path when building in dev mode --- build.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/build.go b/build.go index 35531faf2dd..3f92f8833a2 100644 --- a/build.go +++ b/build.go @@ -156,8 +156,8 @@ func makeLatestDistCopies() { } latestMapping := map[string]string{ - "_amd64.deb": "dist/grafana_latest_amd64.deb", - ".x86_64.rpm": "dist/grafana-latest-1.x86_64.rpm", + "_amd64.deb": "dist/grafana_latest_amd64.deb", + ".x86_64.rpm": "dist/grafana-latest-1.x86_64.rpm", ".linux-amd64.tar.gz": "dist/grafana-latest.linux-x64.tar.gz", } @@ -232,7 +232,7 @@ func createDebPackages() { previousPkgArch := pkgArch if pkgArch == "armv7" { pkgArch = "armhf" - } + } createPackage(linuxPackageOptions{ packageType: "deb", homeDir: "/usr/share/grafana", @@ -256,8 +256,10 @@ func createDebPackages() { func createRpmPackages() { previousPkgArch := pkgArch switch { - case pkgArch == "armv7" : pkgArch = "armhfp" - case pkgArch == "arm64" : pkgArch = "aarch64" + case pkgArch == "armv7": + pkgArch = "armhfp" + case pkgArch == "arm64": + pkgArch = "aarch64" } createPackage(linuxPackageOptions{ packageType: "rpm", @@ -416,6 +418,10 @@ func test(pkg string) { func build(binaryName, pkg string, tags []string) { binary := fmt.Sprintf("./bin/%s-%s/%s", goos, goarch, binaryName) + if isDev { + //dont include os and arch in output path in dev environment + binary = fmt.Sprintf("./bin/%s", binaryName) + } if goos == "windows" { binary += ".exe"