From 8b92ecb505675d157c925bc7b6980a6e74831033 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 19 Nov 2020 21:36:07 -0500 Subject: add ci function to replace builds.sr.ht --- .build.yml | 20 -------------------- Biz/Bild/ShellHook.sh | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 20 deletions(-) delete mode 100644 .build.yml diff --git a/.build.yml b/.build.yml deleted file mode 100644 index acbcf00..0000000 --- a/.build.yml +++ /dev/null @@ -1,20 +0,0 @@ -image: nixos/unstable -sources: - - git@git.sr.ht:~ben/biz -secrets: - - 6a44134f-d160-4702-825f-26e49398f8e9 -tasks: - - build: | - cd biz - nix-shell --run "bild Biz/Pie.hs" - nix-shell --run "bild Biz/Pie.nix" - nix-shell --run "bild Biz/Cloud.nix" - nix-shell --run "bild Biz/Dev.nix" - - #nix-shell --run "bild Que/Site.hs" - #nix-shell --run "bild Que/Host.hs" - #nix-shell --run "bild Que/Prod.nix" - - #nix-shell --run "bild Hero/Host.hs" - #nix-shell --run "bild Hero/Node.hs" - #nix-shell --run "bild Hero/Prod.nix" diff --git a/Biz/Bild/ShellHook.sh b/Biz/Bild/ShellHook.sh index 7f82286..019c5a3 100644 --- a/Biz/Bild/ShellHook.sh +++ b/Biz/Bild/ShellHook.sh @@ -3,6 +3,7 @@ function help() { echo "bizdev" | figlet | lolcat echo "" echo " bild compile code" + echo " ci run all builds and tests" echo " deps manage dependencies with niv" echo " ghci start ghci with correct options" echo " help show this message" @@ -95,4 +96,26 @@ function ship() { done } +# Poor man's ci +function ci() { + set -e + lint + stuff=( + Biz/Pie.hs + Biz/Pie.nix + Biz/Cloud.nix + Biz/Dev.nix + Que/Site.hs + Que/Host.hs + Que/Prod.nix + Hero/Host.hs + Hero/Node.hs + Hero/Prod.nix + ) + for thing in ${stuff[@]} + do + bild $thing + done +} + help -- cgit v1.2.3