diff options
Diffstat (limited to 'control.write.go')
| -rw-r--r-- | control.write.go | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/control.write.go b/control.write.go index 2ee4cad..b161430 100644 --- a/control.write.go +++ b/control.write.go @@ -1,16 +1,5 @@ package main -import ( - "fmt" - "os" - "strings" - "time" - - "go.wit.com/lib/cobol" - "go.wit.com/lib/protobuf/gitpb" - "go.wit.com/log" -) - /* The default order to write the fields in the control file: @@ -39,6 +28,7 @@ root@mirrors:/home/mirrors/debian/pool/main/m/moon-buggy# dpkg -I moon-buggy_1.0 dangerous craters there. Fortunately your car can jump over them! */ +/* func writeDebianControlFile(repo *gitpb.Repo) bool { filename := "files/DEBIAN/control" cf, err := os.OpenFile(filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) @@ -116,26 +106,4 @@ func computeControlValues(repo *gitpb.Repo) bool { } return true } - -/* -// stamp := time.Now().UTC().Format("2006/01/02 15:04:05 UTC") - -func getDateStamp(tag string) string { - var r cmd.Status - r = me.repo.Run([]string{"git", "log", "-1", "--format=%at", tag}) - - out := strings.Join(r.Stdout, "\n") - out = strings.TrimSpace(out) - - // Convert the string to an integer - gitTagTimestampInt, err := strconv.ParseInt(out, 10, 64) - if err != nil { - fmt.Println("Error converting timestamp:", err) - return "git tag " + tag + " unknown" - } - - // Parse the Unix timestamp into a time.Time object - gitTagDate := time.Unix(gitTagTimestampInt, 0) - return gitTagDate.UTC().Format("2006-01-02_15:04:05_UTC") // close to RFC3339 -} */ |
