allow the .deb package to be a different name
This commit is contained in:
parent
350d5e5860
commit
d45037dee9
|
@ -70,7 +70,7 @@ func (c *controlBox) buildPackage() (bool, error) {
|
|||
} else {
|
||||
// set the GO111 build var to true. pass the versions to the compiler manually
|
||||
os.Setenv("GO111MODULE", "off")
|
||||
cmd := []string{"go", "build", "-v", "-x"}
|
||||
cmd := []string{"go", "build"}
|
||||
|
||||
// set standard ldflag options
|
||||
now := time.Now()
|
||||
|
@ -96,9 +96,18 @@ func (c *controlBox) buildPackage() (bool, error) {
|
|||
}
|
||||
}
|
||||
|
||||
filebase := filepath.Base(c.pathL.String())
|
||||
if fullfilename != filebase {
|
||||
// this exception is for when you want to override a package name
|
||||
// sometimes that's the best option. This way you can keep your
|
||||
// name, but the .deb package name can be different so you can
|
||||
// still apt-get it. For an example, look at the gozookeeper package
|
||||
fullfilename = filebase
|
||||
}
|
||||
|
||||
if !shell.Exists(fullfilename) {
|
||||
log.Warn("build failed. filename does not exist", fullfilename)
|
||||
return false, errors.New("missing" + fullfilename)
|
||||
return false, errors.New("missing " + fullfilename)
|
||||
}
|
||||
|
||||
if shell.Exists("files") {
|
||||
|
|
Loading…
Reference in New Issue