Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

posh.plugin-base not included in jar file? #20

Open
markaddleman opened this issue Feb 1, 2017 · 17 comments
Open

posh.plugin-base not included in jar file? #20

markaddleman opened this issue Feb 1, 2017 · 17 comments

Comments

@markaddleman
Copy link

I'm trying to write a posh binding to rum and discovered that posh.plugin-base is not included in the posh jar file v0.5.5 from clojars. I don't see anything obviously wrong in the project.clj. In fact, when I generate the jar locally, the plugin-base is there.

@alexandergunnarson
Copy link
Collaborator

alexandergunnarson commented Feb 1, 2017

That's likely because posh.plugin-base is on master but hasn't been released as part of an artifact :) You could release your own artifact like [markzorkman/posh "0.5.6"] ?

... though maybe @mpdairy wants to prep another release?

@mpdairy
Copy link
Owner

mpdairy commented Feb 1, 2017

@alexandergunnarson Oh, yes! I really need to get it set up on CircleCI. Do you have any example circleCI configs I could work off of? Or maybe it's easy enough just by looking at their docs...

@alexandergunnarson
Copy link
Collaborator

I have a CircleCI file I usually use — let me paste it in here.

@alexandergunnarson
Copy link
Collaborator

alexandergunnarson commented Feb 1, 2017

circle.yml:

test:
  override:
    - case $CIRCLE_NODE_INDEX in 0) echo "lein test-clj" && lein test-clj ;; 1) echo "lein test-cljs" && lein test-cljs ;; esac:
        parallel: true

That tests Clojure and ClojureScript builds in parallel. If you want to do it serially, that's simple too, but it's nice to have them separable, I think.

lein test-clj for CLJ is easy enough, but to have CLJS support you need something like the following in your project.clj:

:aliases {"test-clj"  ["with-profile" "+test" "test"]
          "test-cljs" ["with-profile" "+test" "doo" "phantom" "test" "once"]}

This in turn requires [lein-doo "0.1.7"] in :profiles > :dev > :plugins.

Then, also for CLJS support, in some sort of central test namespace, you should have e.g.:

(ns posh.tests
  (:require [doo.runner :refer-macros [doo-tests doo-all-tests]]
            #_"Require *all* your test namespaces here for CLJS's sake"))

#?(:cljs (doo-all-tests #"posh.+-test"))

Let me know if you have any other questions!

@mpdairy
Copy link
Owner

mpdairy commented Feb 1, 2017

Ok, thanks! I'll get started on it later today.

@alexandergunnarson
Copy link
Collaborator

No problem! Let me know how I can help, if needed/wanted.

@mpdairy
Copy link
Owner

mpdairy commented Feb 2, 2017

Ok, I didn't get to it today but I will try to set it up earlier tomorrow.

@alexandergunnarson
Copy link
Collaborator

No problem at all!

@mpdairy
Copy link
Owner

mpdairy commented Feb 2, 2017

Do you know how to automatically have it deploy to Clojars?

@mpdairy
Copy link
Owner

mpdairy commented Feb 2, 2017

Oh nevermind, I think I can just do it with ENV variables and lein deploy clojars

@alexandergunnarson
Copy link
Collaborator

Yup :)

@mpdairy
Copy link
Owner

mpdairy commented Feb 2, 2017

Ok, what about version number auto-incrementing?

@mpdairy
Copy link
Owner

mpdairy commented Feb 2, 2017

Maybe the version numbers should remain manual for now.
I tried to get the autodeploy working by copying this guy's example:
https://raw.githubusercontent.com/gmorpheme/lein-githooks/master/circle.yml
And I set the CLOJARS_USERNAME and _PASSWORD env variables.
But I get this terrible error:

lein deploy clojars
Created /home/ubuntu/posh/target/posh-0.5.6.jar
Wrote /home/ubuntu/posh/pom.xml
Could not sign /home/ubuntu/posh/target/posh-0.5.6.jar
gpg: no default secret key: secret key not available
gpg: signing failed: secret key not available


See `lein help gpg` for how to set up gpg.
If you don't expect people to need to verify the authorship of your jar, you
can add `:sign-releases false` to the relevant `:deploy-repositories` entry.

lein deploy clojars returned exit code 1

Action failed: lein deploy clojars

@alexandergunnarson
Copy link
Collaborator

alexandergunnarson commented Feb 2, 2017

Ah yes, the infamous GPG error — the one reason why I rarely deploy to Clojars haha (I set up a Clojars workflow on a different computer but not my current one and I haven't really recovered from it since). You have to use some sort of GPG agent to get it to work. Something like MacGPG. I don't remember the exact sequence of magic incantations to get Clojars to stop complaining but basically MacGPG makes it run smoothly.

Also about version numbers — yeah, probably those are best left manual just in case? Also you can try tagged releases on GitHub but I've never played around with those. I often use just the GitHub hash in place of version numbers (semantic versioning is so misleading) but it breaks the mold and is unfamiliar to users so maybe you wouldn't want to do that :)

@mpdairy
Copy link
Owner

mpdairy commented Feb 2, 2017

Oh dang. Maybe there's some lein clojars command-line option I can do.

@alexandergunnarson
Copy link
Collaborator

Well actually — the GPG guide seems to have significantly improved since I last read it. https://github.com/technomancy/leiningen/blob/master/doc/GPG.md#debian-based-distributions

@alexandergunnarson
Copy link
Collaborator

CircleCI uses Ubuntu (Debian-based Linux) so you can follow those directions to achieve what you want. Sorry I'm not more help right now — just in the middle of something is all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants