-
Notifications
You must be signed in to change notification settings - Fork 44
JReleaser
This page contains info about JReleaser we use during a build. JReleaser is used for both snapshots are releases. Main difference is that as JReleaser is meant for a production tool it will skip some publishing parts for snapshots.
We don’t do releases locally but sometimes it’s convenient to try things out in your own system. Maybe you’re just trying things out or preparing to modify JReleaser scripts.
-
Install JReleaser from https://github.com/jreleaser/jreleaser/releases
Use fine grained PAT to give access only to your own repos, then you’re not messing up anything in production. Needed permissions in fine grained PAT is read/write with Contents. With fine grained PAT only add target repos in your own account/org.
JReleaser expects some things to exist, so run a build and setup jdks.
./gradlew build -x test
./gradlew -PcliRelease=true setupJdks
export JRELEASER_GITHUB_TOKEN=<PAT>
JReleaser will not publish snapshots to brew repo so you need to build non-snapshot version locally.
We’re running in a container which can be thrown away. Prepare a container:
docker run --name jr-ubuntu-1804-brew -d -t ubuntu:18.04
docker exec -it jr-ubuntu-1804-brew bash
apt update
apt install -y git curl gcc
Install brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /root/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"