|
@@ -76,6 +76,14 @@ func main() {
|
|
|
grunt("release")
|
|
grunt("release")
|
|
|
createLinuxPackages()
|
|
createLinuxPackages()
|
|
|
|
|
|
|
|
|
|
+ case "pkg-rpm":
|
|
|
|
|
+ grunt("release")
|
|
|
|
|
+ createRpmPackages()
|
|
|
|
|
+
|
|
|
|
|
+ case "pkg-deb":
|
|
|
|
|
+ grunt("release")
|
|
|
|
|
+ createDebPackages()
|
|
|
|
|
+
|
|
|
case "latest":
|
|
case "latest":
|
|
|
makeLatestDistCopies()
|
|
makeLatestDistCopies()
|
|
|
|
|
|
|
@@ -147,7 +155,7 @@ type linuxPackageOptions struct {
|
|
|
depends []string
|
|
depends []string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func createLinuxPackages() {
|
|
|
|
|
|
|
+func createDebPackages() {
|
|
|
createPackage(linuxPackageOptions{
|
|
createPackage(linuxPackageOptions{
|
|
|
packageType: "deb",
|
|
packageType: "deb",
|
|
|
homeDir: "/usr/share/grafana",
|
|
homeDir: "/usr/share/grafana",
|
|
@@ -167,7 +175,9 @@ func createLinuxPackages() {
|
|
|
|
|
|
|
|
depends: []string{"adduser", "libfontconfig"},
|
|
depends: []string{"adduser", "libfontconfig"},
|
|
|
})
|
|
})
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+func createRpmPackages() {
|
|
|
createPackage(linuxPackageOptions{
|
|
createPackage(linuxPackageOptions{
|
|
|
packageType: "rpm",
|
|
packageType: "rpm",
|
|
|
homeDir: "/usr/share/grafana",
|
|
homeDir: "/usr/share/grafana",
|
|
@@ -189,6 +199,11 @@ func createLinuxPackages() {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func createLinuxPackages() {
|
|
|
|
|
+ createDebPackages()
|
|
|
|
|
+ createRpmPackages()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
func createPackage(options linuxPackageOptions) {
|
|
func createPackage(options linuxPackageOptions) {
|
|
|
packageRoot, _ := ioutil.TempDir("", "grafana-linux-pack")
|
|
packageRoot, _ := ioutil.TempDir("", "grafana-linux-pack")
|
|
|
|
|
|
|
@@ -315,6 +330,8 @@ func build(pkg string, tags []string) {
|
|
|
args = append(args, "-o", binary)
|
|
args = append(args, "-o", binary)
|
|
|
args = append(args, pkg)
|
|
args = append(args, pkg)
|
|
|
setBuildEnv()
|
|
setBuildEnv()
|
|
|
|
|
+
|
|
|
|
|
+ runPrint("go", "version")
|
|
|
runPrint("go", args...)
|
|
runPrint("go", args...)
|
|
|
|
|
|
|
|
// Create an md5 checksum of the binary, to be included in the archive for
|
|
// Create an md5 checksum of the binary, to be included in the archive for
|