Fork me on GitHub
#babashka
<
2021-02-10
>
jaide14:02:36

Can one run bb scripts in a GitHub action? Or would circleci be a better choice?

borkdude14:02:20

You surely can. There is even an action to install bb: https://github.com/turtlequeue/setup-babashka

🎉 3
borkdude14:02:38

Although installing bb is nothing more than just downloading the binary and unzipping it

jaide14:02:48

Of course simple_smile

ericdallo14:02:20

@jayzawrotny check clojure-lsp GH action, we run bb to test integration tests 🙂

ericdallo14:02:48

that action doesn't support windows yet, but I opened an issue there about that

grazfather19:02:44

that’s cool. What are you planning to do, @jayzawrotny?

jaide20:02:47

Hah it’s actually going to be pretty boring but https://github.com/eccentric-j/doom-icon. Right now for each icon I’m taking a .png, and manually creating a .iconset at various sizes, and a .ico. I’m curious what it would take to take a single png for each icon and generate all that.

jaide20:02:57

The plan is to try https://github.com/mikera/imagez for the image resizing with bb and possibly translate https://github.com/redoPop/ico-packer/blob/master/index.js into bb Clojure as well.

borkdude20:02:17

I'm pretty sure that lib won't work with bb since bb doesn't have all the classes necessary. I think this would be an ideal candidate for a pod or you could shell out to some CLI programs to do it.

borkdude20:02:07

e.g. imagemagick

jaide20:02:38

Ah well that saves me some trouble. Thanks!

borkdude20:02:42

It would be cool to have some image utility pod maybe, but I'm not up to date what's the best tool / programming language for that. Maybe you could podify the imagez lib itself, if you feel like

borkdude20:02:41

And then we could put it in the registry

jaide20:02:46

Worth a shot, plus shifts the project from being 100% selfish to something potentially useful.

borkdude20:02:13

I think the buddy pod is probably a good starting pod, as it's fairly similar

borkdude20:02:33

in terms of doing things with bytes

borkdude20:02:41

but shelling out to some CLI is totally reasonable too, so don't feel pressured!

borkdude20:02:59

have you seen the ffmpeg babashka video someone recently made?

jaide20:02:00

I heard of it but haven’t watched it, I’ll look it up. It sounds useful to know how to put a pod together so I can at least explore that direction and see what happens.

borkdude20:02:18

yeah that one is not about a pod, he just shells out, very simply

borkdude20:02:38

basically how you would do it in bash

jaide20:02:34

Right, I wrote something kind of in that vein yesterday https://github.com/eccentric-j/doom-icon/blob/master/scripts/release. It generates a .zip of the main icon files, shells out to zip but uses fs for everything else.

borkdude21:02:38

ah, zip is one of those things that bb can do btw. but it's probably more convenient to shell out, since there's not really a nice fn for it, you can do it using the interop with java.util.zip

borkdude21:02:16

at least the unzipping, don't know even if it can zip