ugit @main -
refs -
log -
-
https://git.jolheiser.com/ugit.git
Signature
-----BEGIN SSH SIGNATURE-----
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY
oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5
AAAAQF9/D8yl9GBMekOZpIoRF/VshqoLfT3Qnpi0VUetT0MwCu/foaQE6nXg0KY29l+8oL
G+liRarAhUU3dR9MsFPwY=
-----END SSH SIGNATURE-----
diff --git a/cmd/ugit-uci/main.go b/cmd/ugit-uci/main.go
deleted file mode 100644
index e9105a908acfe0daae0a77624f1b6caf129ae420..0000000000000000000000000000000000000000
--- a/cmd/ugit-uci/main.go
+++ /dev/null
@@ -1,68 +0,0 @@
-package main
-
-import (
- "bytes"
- "flag"
- "fmt"
- "io"
- "net/http"
- "os"
-
- "github.com/go-git/go-git/v5"
-)
-
-func maine() error {
- repoDir, ok := os.LookupEnv("UGIT_REPODIR")
- if !ok {
- panic("UGIT_REPODIR not set")
- }
-
- urlFlag := flag.String("url", "http://localhost:3448", "URL for UCI")
- flag.StringVar(urlFlag, "u", *urlFlag, "--url")
- repoDirFlag := flag.String("repo-dir", "", "Repo dir (including .git)")
- flag.StringVar(repoDirFlag, "rd", *repoDirFlag, "--repo-dir")
- manifestFlag := flag.String("manifest", ".uci.jsonnet", "Path to manifest in repo")
- flag.StringVar(manifestFlag, "m", *manifestFlag, "--manifest")
- flag.Parse()
-
- if *repoDirFlag != "" {
- repoDir = *repoDirFlag
- }
-
- repo, err := git.PlainOpen(repoDir)
- if err != nil {
- return fmt.Errorf("could not open git dir %q: %w", repoDir, err)
- }
-
- tree, err := repo.Worktree()
- if err != nil {
- return fmt.Errorf("could not get worktree: %w", err)
- }
-
- fi, err := tree.Filesystem.Open(*manifestFlag)
- if err != nil {
- return fmt.Errorf("could not open manifest %q: %w", *manifestFlag, err)
- }
- defer fi.Close()
-
- data, err := io.ReadAll(fi)
- if err != nil {
- return fmt.Errorf("could not read manifest: %w", err)
- }
-
- resp, err := http.Post(*urlFlag, "application/jsonnet", bytes.NewReader(data))
- if err != nil {
- return fmt.Errorf("could not post manifest: %w", err)
- }
- if resp.StatusCode != http.StatusOK {
- return fmt.Errorf("non-ok response: %s", resp.Status)
- }
-
- return nil
-}
-
-func main() {
- if err := maine(); err != nil {
- fmt.Println(err)
- }
-}
diff --git a/nix/pkg.nix b/nix/pkg.nix
index 6783a9c6105c656df8fee38f382631269c586cff..e1c22d6e2ab96cff9accf11a24dd5a6761722ccb 100644
--- a/nix/pkg.nix
+++ b/nix/pkg.nix
@@ -15,7 +15,6 @@ }
);
subPackages = [
"cmd/ugitd"
- "cmd/ugit-uci"
];
vendorHash = pkgs.lib.fileContents ../go.mod.sri;
env.CGO_ENABLED = 0;
diff --git a/nix/test.nix b/nix/test.nix
index 9b5e625a43c5b62114b86572cbf29c2abe007bf1..095c9065b8e064ed7ceee1624bd5a244c108032d 100644
--- a/nix/test.nix
+++ b/nix/test.nix
@@ -17,10 +17,6 @@ content = ''
echo "Pre-receive hook executed"
'';
}
- {
- name = "ugit-uci";
- content = "${config.services.ugit.package}/bin/ugit-uci";
- }
];
};
}