Fork me on GitHub
#boot
<
2016-06-20
>
borkdude07:06:17

Hey guys. I made this script from a normal project. What I was wondering, is it possible to develop code in this form in a REPL? so a standalone script only. https://gist.github.com/borkdude/501e3a8db94946adea759350fa223ca2

alandipert07:06:32

@borkdude: I dev scripts using load-file

alandipert07:06:13

One could also call (boot (repl)) in the script for dev

nha12:06:58

Is there something like a boot task to automate uploading release jars to github ? (Talking about those: https://github.com/boot-clj/boot/releases ).

nha13:06:41

Thanks I'll have a look 🙂

berrysoup15:06:00

Hi, How can task pass some variable into another task? I have in my project one task which change runtime env and further I would like to read the state for task-opts: pom: {:version #(update-in % [:version] (fnil get-env :version))} doesnot work

berrysoup15:06:44

direct (get-env :version) reads the starting value which is nil.

micha15:06:00

@berrysoup: those kinds of global mutation should not be done inside the pipeline

micha15:06:34

like stateful transducers, you want to manipulate state in the outermost task wrapper layer, like this:

micha15:06:46

(deftask foop
  []
  (task-options!
    pom {:version (compute-version ...)})
  ;; rest of task here

micha15:06:31

the boot env is for jvm configuration, why don't you just make a var with the version?

micha15:06:57

@berrysoup: rather than (set-env! :my-thing my-value) you should do (def my-thing my-value)

berrysoup15:06:18

@micha: ok I got it. thanks a lot. In my project i have like that but I thought if it is possible to add an option for setting up version manually.

micha15:06:03

@berrysoup: how do you mean?

micha15:06:20

like how do you mean "manually"?

berrysoup15:06:32

@micha: by user from command line like: > boot write-version --version "1.1" pom target and have pom with the 1.1 even if the build.boot I had 1.0

berrysoup15:06:07

@micha: but that might make further problems.

micha15:06:21

why not put the write-version task after the pom task in the pipeline

micha15:06:31

then your task can modify the pom

micha15:06:48

and get it from the fileset, in the normal boot way

micha15:06:02

then you don't need to mess around with global state at all

micha15:06:22

there are functions in boot for parsing and writing poms

micha16:06:17

those functions are in boot.pod

berrysoup16:06:49

@micha: Ok. Big thanks.

micha16:06:32

i think you will need to modify both pom.xml and pom.properties btw

flyboarder16:06:02

@berrysoup: boot-semver will let you set a version.properties file then you can call get-version wherever you need to

berrysoup17:06:19

@flyboarder: Thanks!! Probably that is what I am looking for. I need to find how to write last git commit using (boot.git/last-commit)

pvinis18:06:32

guys, in a build.boot, how can i upgrade the dependencies to a newer version?

pvinis18:06:40

do i have to go check the websites and see? or is there an easy way to see or update the version number?

micha18:06:45

@pvinis: boot show -u

micha18:06:59

also boot show -d and boot show -p

pvinis18:06:49

aha. thanks

pvinis18:06:52

i will check them out

flyboarder18:06:54

@berrysoup: not sure that boot.git has any write functionality, that was something I was looking to do with boot-semver in the next version, commit to git and provide commit based change log

richiardiandrea18:06:33

the above idea is great, I was thinking of a switch (`-g/--from-git`) that changes the content of version.properties based on the last tag

lwhorton18:06:42

hey @micha thanks for the tip - i didn’t know this was a feature (hard to find in the docs, had to grep over the repo). I assume this requires the project to be compiled into a jar? (cool, found this on gh issues: >this is why the checkout task consumes jars, it decouples the builds so the consumer doesn't need to know how to build the submodule)

micha18:06:43

@lwhorton: yeah, i mean if it's a dependency you'll be loading it via jars anyway, right?

micha18:06:04

so this allows a very robust way of handling the checkouts process

micha18:06:14

where you don't need to modify your project

micha18:06:31

you can consume the checkout dependency the same way as it will be when it's a normal dependency

lwhorton18:06:16

that’s cool, but now that I know how to do it i’m not sure its what I wanted in the first place… feels heavy. I just wanted to avoid (for now) the duplication of pulling in stuff like re_frame, logging, etc. where I have my own wrapped implementations.

lwhorton18:06:52

Eventually I will pull those out into “my_reframe” as an explicit isolated module I suppose. I just don’t want to do that so soon.

micha18:06:53

you can install your wrapped implementations in local maven

micha18:06:03

you don't need to push it to clojars

micha18:06:18

otherwise you need to merge the projects

lwhorton18:06:44

i’ll poke around with that some more. I’m not too familiar with the java universe (maven poms jars wars classpaths) etc. You’ve given me plenty to go explore though, thanks.

micha18:06:57

good luck!

micha18:06:05

let me know how it goes 🙂

berrysoup21:06:46

@richiardiandrea: I thought how that might be implemented and the switch seems great

anmonteiro22:06:10

how can I make the sift task only match files at the top level?

anmonteiro22:06:32

e.g. I have a js folder and a foo/js folder, but I only want to match the first

anmonteiro22:06:52

does ./js work?

anmonteiro22:06:35

doesn’t seem to

anmonteiro22:06:56

got it, using ^js/ works

richiardiandrea22:06:58

it is a regular regex so the latter works

berrysoup23:06:54

That has writing functions