diff --git a/buildPackage.go b/buildPackage.go index 8d3bba2..9c9692c 100644 --- a/buildPackage.go +++ b/buildPackage.go @@ -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") {