laminar-config/jobs/laminar-config.run

20 lines
834 B
Text
Raw Normal View History

2024-12-18 05:55:54 +01:00
#!/usr/bin/env sh
# -*- mode: scheme; -*-
IFS=" "
exec scsh -e main -s "$0" "$@"
!#
(define (main args)
(run (git clone --depth 1 https://code.ryuslash.org/ryuslash/laminar-config.git))
(with-cwd "laminar-config"
(run (makepkg))
(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/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")))))))