From 7413f453c988c9f38639b0d44c04485d777f3a4e Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 4 Jan 2025 00:59:37 -0800 Subject: [PATCH] laminar-config: Fix uploading package to forgejo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘with-env’ doesn't appear to work, so I had to implement my own interpretation of it. --- jobs/laminar-config.run | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/jobs/laminar-config.run b/jobs/laminar-config.run index 8383450..3bb98fc 100755 --- a/jobs/laminar-config.run +++ b/jobs/laminar-config.run @@ -7,12 +7,13 @@ exec scsh -e main -s "$0" "$@" (run (git clone --depth 1 https://code.ryuslash.org/ryuslash/laminar-config.git)) (with-cwd "laminar-config" (run (makepkg)) - (with-env (call-with-input-file "../secrets/laminar-config" + (for-each (lambda (pair) (setenv (car pair) (cdr pair))) + (call-with-input-file "/var/lib/laminar/cfg/secrets/laminar-config" (lambda (port) - (read port))) - (run (curl -X PUT "https://code.ryuslash.org/api/packages/ryuslash/arch/extras" - --user ,(format #f "~a:~a" - (getenv "UPLOAD_USER") - (getenv "UPLOAD_TOKEN")) - --header "Content-Type: application/octet-stream" - --data-binary ,(format #f "@~a" (car (glob "*.pkg.tar.zst")))))))) + (read port)))) + (run (curl -X PUT "https://code.ryuslash.org/api/packages/ryuslash/arch/laminar-config" + --user ,(format #f "~a:~a" + (getenv "UPLOAD_USER") + (getenv "UPLOAD_TOKEN")) + --header "Content-Type: application/octet-stream" + --data-binary ,(format #f "@~a" (car (glob "*.pkg.tar.zst")))))))