Liking cljdoc? Tell your friends :D

pod-jackdbd-jsoup

CI/CD Clojars Project

Babashka pod for parsing HTML with jsoup.

How to use it?

If you want to load a version of this pod that was registered (see below) on the Pod registry, you can do it using the qualified keyword of this pod.

(require '[babashka.pods :as pods])
(pods/load-pod 'com.github.jackdbd/pod.jackdbd.jsoup "0.1.2")

Whether the pod is registered or not, you can always load it with this method:

  1. Download the archive (e.g. .zip) containing the pod binary for your OS/architecture from a GitHub release.
  2. Extract the binary from the archive (e.g. unzip it).
  3. Move the binary to your BABASHKA_PODS_DIR.
  4. Load the pod using its file name.
(require '[babashka.pods :as pods])
(pods/load-pod "pod-jackdbd-jsoup")

See also examples/jsoup.bb.

Development

The file devenv.nix declares a developer environment for this project. This file is used by devenv to create such environment. If you don't use devenv you can ignore this file, or use it to understand which dependencies are required by this project.

This project uses a bb.edn file to define a few Babashka tasks. You can type bb tasks to view them.

Linux binary

If you are on Linux, you can compile a statically-linked binary using this Babashka task.

bb build:binary

You can double check that the binary is statically linked using one of the following commands.

ldd target/pod-jackdbd-jsoup
objdump --dynamic-syms target/pod-jackdbd

Versioning

This project uses a canary branch for development and a main branch for production.

All versions created on the canary branch should be SNAPSHOT versions.

When you introduce at least one bug fix on canary, run this command:

bb snapshot patch

When you introduce at least one new feature on canary, run this command:

bb snapshot minor

When you introduce at least one breaking change feature on canary, run this command:

bb snapshot major

All versions created on the main branch should be stable versions.

When a PR gets merged from canary to main, immediately run these commands:

git checkout main
git pull
bb stable # 1.2.3-SNAPSHOT->1.2.3 + commit + tag
git push

The command bb stable promotes the latest SNAPSHOT version to a stable version and creates an annotated git tag. Then git push triggers the CI/CD pipeline that creates a new GitHub release and publishes the uberjar to Clojars.

Switch back to canary and integrate the changes from main:

git checkout canary
git rebase origin/main
bb snapshot patch # version bump (patch|minor|major) + commit + tag
git push

Registering the pod on the Pod registry

The CI/CD pipeline takes care of creating a GitHub release that includes the following assets:

  • Binary executables for Linux, macOS and Windows.
  • An uberjar (the one published to Clojars).
  • A manifest.edn that can be used register the pod on the Pod registry.

Download the manifest.edn and make a PR on the Pod registry following these instructions.

important

Every pod version has its own manifest.edn.

Once the PR on Pod registry gets merged, the pod version will be considered registered and users will be able to load it using the qualified keyword for the pod and the desired version.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close