Factual / geo

Clojure library for working with geohashes, polygons, and other world geometry
Eclipse Public License 1.0
303 stars 17 forks source link

Clojars release script for Travis CI #51

Closed worace closed 5 years ago

worace commented 5 years ago

I'm not 100% sure on this -- it may take a little more debugging once we try to actually run it on master. But the idea is that this will check all commits to master for a new version (i.e. one that doesn't exist in github and clojars), and push it if needed.

So in theory this would let us do future releases by just making a PR to bump the version.

Depending how far down the automation route we want to go, there seem to also be plugins that will automatically bump the version for you as well, but this is probably enough to start.

So far I have been testing it using Docker locally to try to isolate all the travis / git deps as much as I can:

docker run -it \
       -e CLOJARS_USERNAME=<secret> \
       -e CLOJARS_PASSWORD=<secret> \
       -v $(pwd):/code/geo -v \
       ~/.ssh/geo_deploy_key:/code/geo/geo_deploy_key \
       -w /code/geo clojure:latest \
       ./scripts/release.sh

Which makes me fairly optimistic it might work in travis. The difference is that in Travis the clojars vars and the SSH key will be decrypted from values stored in the repo and made available to the build.

willcohen commented 5 years ago

Looks good to me! I've only ever done this with circleci so my guess is as good as yours for travis, though the fact that you got rc-1 deployed with docker seems pretty promising. If you think this looks right for a first version I say push it...

worace commented 5 years ago

@willcohen yeah that's what I figure...we may end up wasting a few versions testing it out, but hopefully it won't be too hard to work out the kinks.