mirror of
https://github.com/grafana/grafana.git
synced 2024-12-26 08:51:33 -06:00
fix names of foreign arch packages
This commit is contained in:
parent
ed110bc312
commit
22638db532
13
build.go
13
build.go
@ -144,7 +144,7 @@ func packageGrafana() {
|
|||||||
grunt(postProcessArgs...)
|
grunt(postProcessArgs...)
|
||||||
pkgArch = previousPkgArch
|
pkgArch = previousPkgArch
|
||||||
|
|
||||||
if goos == "linux" && goarch == "amd64"{
|
if goos == "linux" {
|
||||||
createLinuxPackages()
|
createLinuxPackages()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,6 +229,10 @@ type linuxPackageOptions struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func createDebPackages() {
|
func createDebPackages() {
|
||||||
|
previousPkgArch := pkgArch
|
||||||
|
if pkgArch == "armv7" {
|
||||||
|
pkgArch = "armhf"
|
||||||
|
}
|
||||||
createPackage(linuxPackageOptions{
|
createPackage(linuxPackageOptions{
|
||||||
packageType: "deb",
|
packageType: "deb",
|
||||||
homeDir: "/usr/share/grafana",
|
homeDir: "/usr/share/grafana",
|
||||||
@ -246,9 +250,15 @@ func createDebPackages() {
|
|||||||
|
|
||||||
depends: []string{"adduser", "libfontconfig"},
|
depends: []string{"adduser", "libfontconfig"},
|
||||||
})
|
})
|
||||||
|
pkgArch = previousPkgArch
|
||||||
}
|
}
|
||||||
|
|
||||||
func createRpmPackages() {
|
func createRpmPackages() {
|
||||||
|
previousPkgArch := pkgArch
|
||||||
|
switch {
|
||||||
|
case pkgArch == "armv7" : pkgArch = "armhfp"
|
||||||
|
case pkgArch == "arm64" : pkgArch = "aarch64"
|
||||||
|
}
|
||||||
createPackage(linuxPackageOptions{
|
createPackage(linuxPackageOptions{
|
||||||
packageType: "rpm",
|
packageType: "rpm",
|
||||||
homeDir: "/usr/share/grafana",
|
homeDir: "/usr/share/grafana",
|
||||||
@ -266,6 +276,7 @@ func createRpmPackages() {
|
|||||||
|
|
||||||
depends: []string{"/sbin/service", "fontconfig", "freetype", "urw-fonts"},
|
depends: []string{"/sbin/service", "fontconfig", "freetype", "urw-fonts"},
|
||||||
})
|
})
|
||||||
|
pkgArch = previousPkgArch
|
||||||
}
|
}
|
||||||
|
|
||||||
func createLinuxPackages() {
|
func createLinuxPackages() {
|
||||||
|
@ -18,20 +18,18 @@ echo "current dir: $(pwd)"
|
|||||||
|
|
||||||
if [ "$CIRCLE_TAG" != "" ]; then
|
if [ "$CIRCLE_TAG" != "" ]; then
|
||||||
echo "Building releases from tag $CIRCLE_TAG"
|
echo "Building releases from tag $CIRCLE_TAG"
|
||||||
go run build.go -goarch armv7 -cc ${CCARMV7} -includeBuildNumber=false build
|
OPT="-includeBuildNumber=false"
|
||||||
go run build.go -goarch arm64 -cc ${CCARM64} -includeBuildNumber=false build
|
|
||||||
go run build.go -goos darwin -cc ${CCOSX64} -includeBuildNumber=false build
|
|
||||||
go run build.go -goos windows -cc ${CCWIN64} -includeBuildNumber=false build
|
|
||||||
CC=${CCX64} go run build.go -includeBuildNumber=false build
|
|
||||||
else
|
else
|
||||||
echo "Building incremental build for $CIRCLE_BRANCH"
|
echo "Building incremental build for $CIRCLE_BRANCH"
|
||||||
go run build.go -goarch armv7 -cc ${CCARMV7} -buildNumber=${CIRCLE_BUILD_NUM} build
|
OPT="-buildNumber=${CIRCLE_BUILD_NUM}"
|
||||||
go run build.go -goarch arm64 -cc ${CCARM64} -buildNumber=${CIRCLE_BUILD_NUM} build
|
|
||||||
go run build.go -goos darwin -cc ${CCOSX64} -buildNumber=${CIRCLE_BUILD_NUM} build
|
|
||||||
go run build.go -goos windows -cc ${CCWIN64} -buildNumber=${CIRCLE_BUILD_NUM} build
|
|
||||||
CC=${CCX64} go run build.go -buildNumber=${CIRCLE_BUILD_NUM} build
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
go run build.go -goarch armv7 -cc ${CCARMV7} ${OPT} build
|
||||||
|
go run build.go -goarch arm64 -cc ${CCARM64} ${OPT} build
|
||||||
|
go run build.go -goos darwin -cc ${CCOSX64} ${OPT} build
|
||||||
|
go run build.go -goos windows -cc ${CCWIN64} ${OPT} build
|
||||||
|
CC=${CCX64} go run build.go ${OPT} build
|
||||||
|
|
||||||
yarn install --pure-lockfile --no-progress
|
yarn install --pure-lockfile --no-progress
|
||||||
|
|
||||||
echo "current dir: $(pwd)"
|
echo "current dir: $(pwd)"
|
||||||
@ -41,47 +39,31 @@ if [ -d "dist" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CIRCLE_TAG" != "" ]; then
|
if [ "$CIRCLE_TAG" != "" ]; then
|
||||||
echo "Building frontend from tag $CIRCLE_TAG"
|
echo "Building frontend and packaging from tag $CIRCLE_TAG"
|
||||||
go run build.go -includeBuildNumber=false build-frontend
|
|
||||||
echo "Packaging a release from tag $CIRCLE_TAG"
|
|
||||||
go run build.go -goos linux -pkg-arch amd64 -includeBuildNumber=false package-only latest
|
|
||||||
go run build.go -goos linux -pkg-arch armv7 -includeBuildNumber=false package-only
|
|
||||||
go run build.go -goos linux -pkg-arch arm64 -includeBuildNumber=false package-only
|
|
||||||
|
|
||||||
if [ -d '/tmp/phantomjs/darwin' ]; then
|
|
||||||
cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs
|
|
||||||
else
|
|
||||||
echo 'PhantomJS binaries for darwin missing!'
|
|
||||||
fi
|
|
||||||
go run build.go -goos darwin -pkg-arch amd64 -includeBuildNumber=false package-only
|
|
||||||
|
|
||||||
if [ -d '/tmp/phantomjs/windows' ]; then
|
|
||||||
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
|
|
||||||
rm tools/phantomjs/phantomjs
|
|
||||||
else
|
|
||||||
echo 'PhantomJS binaries for darwin missing!'
|
|
||||||
fi
|
|
||||||
go run build.go -goos windows -pkg-arch amd64 -includeBuildNumber=false package-only
|
|
||||||
else
|
else
|
||||||
echo "Building frontend for $CIRCLE_BRANCH"
|
echo "Building frontend and packaging incremental build for $CIRCLE_BRANCH"
|
||||||
go run build.go -buildNumber=${CIRCLE_BUILD_NUM} build-frontend
|
|
||||||
echo "Packaging incremental build for $CIRCLE_BRANCH"
|
|
||||||
go run build.go -goos linux -pkg-arch amd64 -buildNumber=${CIRCLE_BUILD_NUM} package-only latest
|
|
||||||
go run build.go -goos linux -pkg-arch armv7 -buildNumber=${CIRCLE_BUILD_NUM} package-only
|
|
||||||
go run build.go -goos linux -pkg-arch arm64 -buildNumber=${CIRCLE_BUILD_NUM} package-only
|
|
||||||
|
|
||||||
if [ -d '/tmp/phantomjs/darwin' ]; then
|
|
||||||
cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs
|
|
||||||
else
|
|
||||||
echo 'PhantomJS binaries for darwin missing!'
|
|
||||||
fi
|
|
||||||
go run build.go -goos darwin -pkg-arch amd64 -buildNumber=${CIRCLE_BUILD_NUM} package-only
|
|
||||||
|
|
||||||
if [ -d '/tmp/phantomjs/windows' ]; then
|
|
||||||
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
|
|
||||||
rm tools/phantomjs/phantomjs
|
|
||||||
else
|
|
||||||
echo 'PhantomJS binaries for windows missing!'
|
|
||||||
fi
|
|
||||||
go run build.go -goos windows -pkg-arch amd64 -buildNumber=${CIRCLE_BUILD_NUM} package-only
|
|
||||||
fi
|
fi
|
||||||
|
echo "Building frontend"
|
||||||
|
go run build.go ${OPT} build-frontend
|
||||||
|
echo "Packaging"
|
||||||
|
go run build.go -goos linux -pkg-arch amd64 ${OPT} package-only latest
|
||||||
|
#removing amd64 phantomjs bin for armv7/arm64 packages
|
||||||
|
rm tools/phantomjs/phantomjs
|
||||||
|
go run build.go -goos linux -pkg-arch armv7 ${OPT} package-only
|
||||||
|
go run build.go -goos linux -pkg-arch arm64 ${OPT} package-only
|
||||||
|
|
||||||
|
if [ -d '/tmp/phantomjs/darwin' ]; then
|
||||||
|
cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs
|
||||||
|
else
|
||||||
|
echo 'PhantomJS binaries for darwin missing!'
|
||||||
|
fi
|
||||||
|
go run build.go -goos darwin -pkg-arch amd64 ${OPT} package-only
|
||||||
|
|
||||||
|
if [ -d '/tmp/phantomjs/windows' ]; then
|
||||||
|
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
|
||||||
|
rm tools/phantomjs/phantomjs
|
||||||
|
else
|
||||||
|
echo 'PhantomJS binaries for darwin missing!'
|
||||||
|
fi
|
||||||
|
go run build.go -goos windows -pkg-arch amd64 ${OPT} package-only
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user