Files
jreleaser.github.io/docs/modules/quick-start/pages/cli.adoc
2021-03-28 01:25:04 +01:00

88 lines
2.3 KiB
Plaintext

= Quick Start - CLI
Once JReleaser is installed you may initialize its config file by invoking the following command:
[source]
----
$ jreleaser init --format yml
[INFO] Writing file /Home/duke/app/jreleaser.yml
[INFO] JReleaser initialized at /Home/duke/app
----
This generates a `jreleaser.yml` file with the following configuration
[source,yaml]
.jreleaser.yml
----
project:
name: app
version: 1.0.0-SNAPSHOT
description: Awesome App
longDescription: Awesome App
website: https://acme.com/app
authors:
- Duke
license: Apache-2
java:
groupId: com.acme
version: 8
release:
github:
owner: duke
distributions:
app:
artifacts:
- path: path/to/{{distributionName}}-{{projectVersion}}.zip
----
Edit the file to suite your needs. JReleaser *does not* create artifact files for you. It assumes those are created using
other tools; JReleaser only cares if the resolved artifact paths exist. Once you have edited the file you may verify its
configuration by invoking
[source]
----
$ jreleaser config
----
At any time you may invoke any of the other commands, but when it's time to make a release you have to invoke
[source]
----
$ jreleaser full-release
[INFO] Configuring with jreleaser.yml
[INFO] - basedir set to /Home/duke/app
[INFO] - dryrun set to false
[INFO] Reading configuration
[INFO] Loading properties from /Home/duke/.jreleaser/config.properties
[INFO] Validating configuration
[INFO] Project version set to 1.0.0
[INFO] Release is not snapshot
[INFO] Calculating checksums
[INFO] Signing files
[INFO] Signing is not enabled
[INFO] Releasing to https://github.com/duke/app
[INFO] - Generating changelog: out/jreleaser/release/CHANGELOG.md
[INFO] - Uploading app-1.0.0.zip
[INFO] - Uploading app-1.0.0.tar.gz
[INFO] - Uploading checksums.txt
[INFO] Preparing distributions
[INFO] - Preparing app distribution
[INFO] Packaging distributions
[INFO] - Packaging app distribution
[INFO] Uploading distributions
[INFO] - Uploading app distribution
[INFO] Announcing release
[INFO] Announcing is not enabled. Skipping.
----
This command performs the following actions:
* checksums all artifacts.
* signs all files (if signing is enabled).
* creates a release at the chosen Git repository.
* prepares, packages, and uploads configured packagers (brew, jbang, etc).
* announces the release (if configured).