(define (get-variable name)
  "Ensure that the environment variable NAME exists."
  (or (getenv name)
      (error (format #false "environment variable not set: ~a" name))))

(define (do-the-thing)
  (let ((username (get-variable "USERNAME"))
        (token (get-variable "TOKEN")))

    ;; XXX: this is gross
    (load (string-append (dirname (current-filename)) "/common.scm"))
    (load (string-append (dirname (current-filename)) "/hotfixes.scm"))

    (git:checkout-index %repodir "upstream")
    (git:pull %repodir)
    (git:push %repodir
              (append-string "https://" username ":" token "@" "git.dotya.ml" "/" "kreyren" "/" "guix-kreyren.git")
              upstream)))

(do-the-thing)


Generated by Ricardo Wurmus using scpaste at Thu Sep 22 16:51:04 2022. CEST. (original)