add option pkg-rpm and pkg-deb to create separately both packages #3407

This commit is contained in:
toni-moreno 2015-12-04 22:36:38 +01:00
parent 8eb3e48bc7
commit c9674f84e8

View File

@ -76,6 +76,14 @@ func main() {
grunt("release")
createLinuxPackages()
case "pkg-rpm":
grunt("release")
createRpmPackages()
case "pkg-deb":
grunt("release")
createDebPackages()
case "latest":
makeLatestDistCopies()
@ -146,8 +154,7 @@ type linuxPackageOptions struct {
depends []string
}
func createLinuxPackages() {
func createDebPackages() {
createPackage(linuxPackageOptions{
packageType: "deb",
homeDir: "/usr/share/grafana",
@ -167,7 +174,9 @@ func createLinuxPackages() {
depends: []string{"adduser", "libfontconfig"},
})
}
func createRpmPackages() {
createPackage(linuxPackageOptions{
packageType: "rpm",
homeDir: "/usr/share/grafana",
@ -189,6 +198,11 @@ func createLinuxPackages() {
})
}
func createLinuxPackages() {
createDebPackages()
createRpmPackages()
}
func createPackage(options linuxPackageOptions) {
packageRoot, _ := ioutil.TempDir("", "grafana-linux-pack")