Fork me on GitHub
#boot
<
2016-11-16
>
pseud09:11:07

How do you pass edn to a task from the command-line ?

micha16:11:09

@pseud you must quote it: boot foop --edn-option '{:foop "barp"}'

micha16:11:21

@pseud https://github.com/boot-clj/boot/wiki/Task-Options-DSL#types <-- how different types are parsed from the command line

pseud16:11:43

@micha aaaah, thanks. I had tried using double-quotes and the like. This makes sense, though

micha16:11:06

yeah by quoting i mean in your shell

micha16:11:23

not clojure quote

pseud16:11:26

Yes, makes sense 🙂

micha16:11:07

you can also do this, btw: boot foop --edn-option <(cat some-file.edn)

micha16:11:16

when the quoting becomes a pain

micha16:11:28

(this is bash, dunno about other shells)

levitanong18:11:10

hi all, first time working with bootlaces and pushing to clojars and gpg. I’m getting:

You need a passphrase to unlock the secret key for
user: "Levi I. Tan Ong <[email protected]>"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

gpg-agent[42618]: command get_passphrase failed: Inappropriate ioctl for device
gpg: problem with the agent: Inappropriate ioctl for device
gpg: no default secret key: Operation cancelled
gpg: signing failed: Operation cancelled
Seems like it requires the passphrase but I’m not being prompted for it. Any ideas?

micha19:11:26

@levitanong looks like an issue with your gpg-agent configuration

micha19:11:54

more specifically there is a program it uses to prompt for the passphrase

micha19:11:02

which appears to be failing

micha19:11:16

the thing to google for is something like gpg-agent pinentry

micha19:11:39

pinentry is the prorgam that prompts for the passphrase, there are ncurses terminal ones, GUI ones, etc

micha19:11:39

gpg looks to be running fine

micha19:11:56

but the pinentry program is crashing becuase it can't open the device properly

levitanong19:11:28

I remember reading an SO question about this, and it said something about pinentry and the TTY thing. I set it aside because I didn’t understand the context, but now that you mention pinentry...

micha19:11:49

yeah that's usually the culprit with gpg-agent

levitanong19:11:39

Would you happen to be familiar with fish shell? 😛 I ask because I’m on fish, and I don’t know what $() means in bash 😮

micha19:11:15

no, i just use bash

micha19:11:10

in bash $(...) evaluates an expression in a subshell

micha19:11:12

for example:

micha19:11:31

foo $(echo one two three)

micha19:11:36

is equivalent to

micha19:11:45

foo one two three

micha19:11:15

foo "$(echo one two three)"

#same as
foo "one two three"

levitanong19:11:23

oh there we go, haha that answers it

levitanong19:11:48

will try to do the TTY thing now

levitanong19:11:33

Yay! It worked! Thanks, @micha!

micha19:11:43

sweet, what did you do?

levitanong19:11:49

In fish, the appropriate command is set -x GPG_TTY (tty), where (tty) is the equivalent of $(tty)

levitanong19:11:50

so I just added that to my fish config, the equivalent of .bashrc, and voila!

levitanong19:11:54

oddly, it asks for the passphrase twice

georgek21:11:54

Hi, I’ve got multiple projects with one top-level boot.build script to invoke them and do some deployment packaging. What is the ‘best practice’ for this? I don’t see an obvious way to directly invoke sub-project build tasks in the ‘master’ build.boot. I tried using shell to invoke them in a task but wierdly that exits the task before the shell script it finished and I can’t figure out why (and assume this isn’t what anyone intended). So I’ve ended up using a master BASH script instead… which I hate. What am I missing? How do I ‘daisy-chain’ boot tasks that live in build files in a project hierarchy?

alandipert22:11:00

@georgek what is deployment packaging in your case? pushing jars to a place?

alandipert22:11:32

i ask because boot gives you more flexibility than usual in dirs code is stored etc., so it might be possible to deploy the way you want with a single build.boot

georgek22:11:07

Elastic beanstalk with a bunch of config files that have to be in the correct place within the zip (the actual deployment asset). Oh, also I’m using nginx-clojure so that get’s packaged with my created jar in its lib directory.

georgek22:11:40

Doing all that in my master boot script works great but I have other dependent projects

georgek22:11:08

So at a minimum I need to uberjar the library that is for nginx-clojure that lives in its own boot .build

georgek22:11:11

(in a sub-dir)

georgek22:11:14

Oh, I’ve also got lambdas that get jar’ed and deploy separately and I would love it if that was a different top-level task

georgek22:11:01

Note that in that case the output size of the lambda uberjar is carefully controlled so it can’t inherit non-needed libs