build: skips building rpm for armv6.

This commit is contained in:
Leonard Gram 2019-01-18 11:36:04 +01:00
parent 5f188058e3
commit 2bdc147e55
3 changed files with 13 additions and 4 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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