Add deb package building

This commit is contained in:
kolaente 2020-09-02 22:54:41 +02:00
parent 1a2ca2fbf8
commit b096f2df39
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 21 additions and 8 deletions

View File

@ -56,12 +56,10 @@ var (
// Aliases are mage aliases of targets
Aliases = map[string]interface{}{
"do-the-swag": DoTheSwag,
"check:go-sec": Check.GoSec,
"check:got-swag": Check.GotSwag,
"release:build-deb": Release.BuildDeb,
"release:compress-build": Release.BuildDeb,
"release:os-package": Release.OsPackage,
"do-the-swag": DoTheSwag,
"check:go-sec": Check.GoSec,
"check:got-swag": Check.GotSwag,
"release:os-package": Release.OsPackage,
}
)
@ -595,8 +593,23 @@ func (Release) Zip() error {
return nil
}
func (Release) BuildDeb() {
// Creates a debian package from a built binary
func (Release) Deb() {
runAndStreamOutput(
"fpm",
"-s", "dir",
"-t", "deb",
"--url", "https://vikunja.io",
"-n", "vikunja",
"-v", PkgVersion,
"--license", "GPLv3",
"--directories", "/opt/vikunja",
"--after-install", "./build/after-install.sh",
"--description", "'Vikunja is an open-source todo application, written in Go. It lets you create lists,tasks and share them via teams or directly between users.'",
"-m", "maintainers@vikunja.io",
"./"+BinLocation+"=/opt/vikunja/vikunja",
"./config.yml.sample=/etc/vikunja/config.yml",
)
}
func (Release) Reprepro() {