summaryrefslogtreecommitdiff
path: root/build.go
diff options
context:
space:
mode:
Diffstat (limited to 'build.go')
-rw-r--r--build.go38
1 files changed, 4 insertions, 34 deletions
diff --git a/build.go b/build.go
index 8753b43..a28e6e4 100644
--- a/build.go
+++ b/build.go
@@ -14,33 +14,10 @@ import (
)
func buildPackage(repo *gitpb.Repo) (bool, error) {
- /*
- go install -ldflags " \
- -X main.GITCOMMIT=${GITCOMMIT} \
- -X main.GOVERSION='${GOVERSION}' \
- -X main.BUILDTIME='${BUILDTIME}' \
- -X main.VERSION=${VERSION}"
- */
- // ldflags := "main.GOTAG=" + repo.LastTag()
-
- filename := repo.Control["Package"] // c.Package.String()
- if filename == "" {
- return false, errors.New("filename is blank")
- }
-
- arch := repo.Control["Architecture"] // c.Architecture.String()
- if arch == "" {
- arch = argv.Arch
- }
- // const layout = "200601021504"
- // now := time.Now().UTC()
- version := repo.Control["Version"]
- if argv.BuildVersion != "" {
- version += argv.BuildVersion
- }
- repo.Control["Version"] = version
+ filename := me.pb.Package
+ arch := me.pb.Architecture
+ version := me.pb.Version
log.Info("version is:", version)
- // debver := version + "-" + now.Format(layout)
debname := filename + "_" + version + "_" + arch + ".deb"
var fulldebname string
@@ -141,14 +118,7 @@ func buildPackage(repo *gitpb.Repo) (bool, error) {
log.Warn("go build worked")
}
- filebase := filepath.Base(repo.Control["pathL"]) // 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
- }
+ fullfilename = me.pb.Package
if !shell.Exists(fullfilename) {
log.Warn("build failed. filename does not exist", fullfilename)