Browse Source

build: skips building rpm for armv6.

Leonard Gram 7 years ago
parent
commit
2bdc147e55
3 changed files with 13 additions and 4 deletions
  1. 11 2
      build.go
  2. 1 1
      scripts/build/build-all.sh
  3. 1 1
      scripts/build/build.sh

+ 11 - 2
build.go

@@ -46,6 +46,8 @@ var (
 	binaries              []string = []string{"grafana-server", "grafana-cli"}
 	isDev                 bool     = false
 	enterprise            bool     = false
+	skipRpmGen            bool     = false
+	skipDebGen            bool     = false
 )
 
 func main() {
@@ -67,6 +69,8 @@ func main() {
 	flag.BoolVar(&enterprise, "enterprise", enterprise, "Build enterprise version of Grafana")
 	flag.StringVar(&buildIdRaw, "buildId", "0", "Build ID from CI system")
 	flag.BoolVar(&isDev, "dev", isDev, "optimal for development, skips certain steps")
+	flag.BoolVar(&skipRpmGen, "skipRpm", skipRpmGen, "skip rpm package generation (default: false)")
+	flag.BoolVar(&skipDebGen, "skipDeb", skipDebGen, "skip deb package generation (default: false)")
 	flag.Parse()
 
 	buildId = shortenBuildId(buildIdRaw)
@@ -292,8 +296,13 @@ func createRpmPackages() {
 }
 
 func createLinuxPackages() {
-	createDebPackages()
-	createRpmPackages()
+	if !skipDebGen {
+		createDebPackages()
+	}
+
+	if !skipRpmGen {
+		createRpmPackages()
+	}
 }
 
 func createPackage(options linuxPackageOptions) {

+ 1 - 1
scripts/build/build-all.sh

@@ -69,7 +69,7 @@ rm tools/phantomjs/phantomjs
 
 # build only amd64 for enterprise
 if echo "$EXTRA_OPTS" | grep -vq enterprise ; then
-  go run build.go -goos linux -pkg-arch armv6 ${OPT} package-only
+  go run build.go -goos linux -pkg-arch armv6 ${OPT} -skipRpm package-only
   go run build.go -goos linux -pkg-arch armv7 ${OPT} package-only
   go run build.go -goos linux -pkg-arch arm64 ${OPT} package-only
 

+ 1 - 1
scripts/build/build.sh

@@ -50,7 +50,7 @@ source /etc/profile.d/rvm.sh
 
 echo "Packaging"
 go run build.go -goos linux -pkg-arch amd64 ${OPT} package-only
-go run build.go -goos linux -pkg-arch armv6 ${OPT} package-only
+go run build.go -goos linux -pkg-arch armv6 ${OPT} -skipRpm package-only
 go run build.go -goos linux -pkg-arch armv7 ${OPT} package-only
 go run build.go -goos linux -pkg-arch arm64 ${OPT} package-only