summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-12-02 17:57:15 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2017-12-02 17:57:15 -0500
commitc7c07febf54e043483a20c190021335ae2f43716 (patch)
tree8a18eef8224edf77e1902c109e1b80c8bcf3fd25
parent8d3543c6af458e0c6cfda62a138d21400b2c14a9 (diff)
.
-rw-r--r--fi-pacmanlog/main.go33
1 files changed, 13 insertions, 20 deletions
diff --git a/fi-pacmanlog/main.go b/fi-pacmanlog/main.go
index 81abc2b..d8d9a52 100644
--- a/fi-pacmanlog/main.go
+++ b/fi-pacmanlog/main.go
@@ -6,7 +6,6 @@ import (
"os"
"os/exec"
"strings"
- "strconv"
"git.lukeshu.com/go/libfastimport"
"git.parabola.nu/fiutil"
@@ -46,20 +45,8 @@ func main() {
commitMeta = cmdt
commitFile = []libfastimport.Cmd{}
case libfastimport.CmdCommitEnd:
- commitMeta.Ref = outref
- err := backend.Do(commitMeta)
- if err != nil {
- abort(err)
- }
- if len(commitFile) < 2 {
- break
- }
ver := ""
for _, file := range commitFile {
- err := backend.Do(file)
- if err != nil {
- abort(err)
- }
if m, ok := file.(libfastimport.FileModify); ok && m.Path == "PKGBUILD" {
_, pkgbuild, err := backend.CatBlob(libfastimport.CmdCatBlob{DataRef: m.DataRef})
if err != nil {
@@ -75,16 +62,22 @@ func main() {
ver = strings.TrimSpace(string(out))
}
}
- fmt.Printf("ver: %#v tags: %#v\n", ver, tags)
- if exists := tags[ver]; ver != "" && !exists {
- err = backend.Do(libfastimport.CmdReset{
- RefName: "refs/tags/pacman-" + ver,
- CommitIsh: ":"+strconv.Itoa(commitMeta.Mark),
- })
+ if ver == "" || tags[ver] {
+ break
+ }
+ tags[ver] = true
+ commitMeta.Msg = "core-x86_64 pacman " + ver + " : " + commitMeta.Msg
+ commitMeta.From = ""
+ commitMeta.Ref = outref
+ err = backend.Do(commitMeta)
+ if err != nil {
+ abort(err)
+ }
+ for _, file := range commitFile {
+ err = backend.Do(file)
if err != nil {
abort(err)
}
- tags[ver] = true
}
case libfastimport.FileModify:
if !strings.HasPrefix(string(cmdt.Path), "repos/core-x86_64/") {