Switch to using ci.mirror
change okxquuzzptmwzxloxyqzlvlnzrqlyykv
commit 700ca5c6b31afbbb0ad30445d2673423418766ea
author Alpha Chen <alpha@kejadlen.dev>
date
parent voktqwzq
diff --git a/.quire/ci.fnl b/.quire/ci.fnl
index 6cc21e0..6b8fb46 100644
--- a/.quire/ci.fnl
+++ b/.quire/ci.fnl
@@ -1,35 +1,9 @@
 (local {: job : mirror} (require :quire.ci))
 
-(local mirror-url "https://github.com/kejadlen/quire.git")
-
-(job :tag-and-mirror [:quire/push]
-     (fn [{: sh : secret : jobs}]
-       (let [{: ref : sha : git-dir} (jobs :quire/push)
-             token (secret :github_token)]
-         (when (= ref :refs/heads/main)
-           (let [date (-> (sh "date --utc +%Y-%m-%d")
-                          (. :stdout)
-                          (: :gsub "\n$" ""))
-                 tag (.. :v date "-" (sha:sub 1 8))
-                 encoded (-> (sh "printf '%s' \"$T\" | base64 --wrap=0"
-                                 {:env {:T (.. "x-access-token:" token)}})
-                             (. :stdout))
-                 auth-header (.. "Authorization: Basic " encoded)
-                 git-opts {:env {:GIT_DIR git-dir}}]
-             (sh [:git :tag tag sha] git-opts)
-             (sh [:git
-                  :-c
-                  (.. :http.extraHeader= auth-header)
-                  :push
-                  :--porcelain
-                  mirror-url
-                  :refs/heads/main
-                  (.. :refs/tags/ tag)] git-opts))))))
-
-; (mirror "https://github.com/kejadlen/quire.git"
-;         {:refs [:refs/heads/main]
-;          :secret :github_token
-;          :tag (fn [{: sha}]
-;                 (.. :v (os.date "!%Y-%m-%d") "-" (sha:sub 1 8)))})
+(mirror "https://github.com/kejadlen/quire.git"
+        {:refs [:refs/heads/main]
+         :secret :github_token
+         :tag (fn [{: sha}]
+                (.. :v (os.date "!%Y-%m-%d") "-" (sha:sub 1 8)))})
 
 ; (job :test [:quire/push] (fn [{: sh}] (sh [:cargo :test])))