Skip to content

Commit

Permalink
Merge branch 'main' into feature/fish-completion
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop authored Feb 4, 2023
2 parents 5e210f0 + bc32ce7 commit 5b1cbc8
Show file tree
Hide file tree
Showing 550 changed files with 1,734 additions and 1,459 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ updates:
ignore:
# For Groovy, ignore all updates
- dependency-name: "org.codehaus.groovy:groovy-all"
# For Spring-boot, version 3 requires Java 17
- dependency-name: "org.springframework.boot:spring-boot-starter"
versions: ["3.+"]
- dependency-name: "org.springframework.boot:spring-boot-configuration-processor"
versions: ["3.+"]
- dependency-name: "org.springframework.boot:spring-boot-starter-test"
versions: ["3.+"]
103 changes: 94 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,126 @@
name: Build
on: [ push, pull_request ]
permissions: read-all
permissions:
checks: write
pull-requests: write

jobs:
build-java-8-plus:
strategy:
matrix:
java-version: [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18-ea ]
java-version: [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.os == 'macos-latest' }}
continue-on-error: ${{ matrix.os == 'macos-latest' || matrix.java-version == '9' || matrix.java-version == '10' || matrix.java-version == '12' || matrix.java-version == '13' || matrix.java-version == '14' || matrix.java-version == '15' || matrix.java-version == '16' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@2e205a28d0e1da00c5f53b161f4067b052c61f34 # v1
uses: step-security/harden-runner@18bf8ad2ca49c14cbb28b91346d626ccfb00c518 # v1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v2

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1

- name: Configure JDK ${{ matrix.java-version }}
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # v2
uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
cache: gradle

- name: Show Gradle Version
run: ./gradlew --version

- name: ShowToolChains
run: ./gradlew -q javaToolchains

- name: Build
run: ./gradlew build --no-daemon

- name: Publish Test Results (Linux)
uses: EnricoMi/publish-unit-test-result-action@v2
id: test-results-nix
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
with:
junit_files: |
build/test-results/test/**/*.xml
picocli-*/build/test-results/test/**/*.xml
- name: Publish Test Results (Win/Mac)
uses: EnricoMi/publish-unit-test-result-action/composite@v2
id: test-results
if: ${{ always() && (matrix.os == 'macos-latest' || matrix.os == 'windows-latest') }}
with:
junit_files: |
build/test-results/test/**/*.xml
picocli-*/build/test-results/test/**/*.xml
- name: Set badge color (Linux)
shell: bash
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
run: |
case ${{ fromJSON( steps.test-results-nix.outputs.json ).conclusion }} in
success)
echo "BADGE_COLOR=31c653" >> $GITHUB_ENV
;;
failure)
echo "BADGE_COLOR=800000" >> $GITHUB_ENV
;;
neutral)
echo "BADGE_COLOR=696969" >> $GITHUB_ENV
;;
esac
- name: Set badge color (Win/Mac)
shell: bash
if: ${{ always() && (matrix.os == 'macos-latest' || matrix.os == 'windows-latest') }}
run: |
case ${{ fromJSON( steps.test-results.outputs.json ).conclusion }} in
success)
echo "BADGE_COLOR=31c653" >> $GITHUB_ENV
;;
failure)
echo "BADGE_COLOR=800000" >> $GITHUB_ENV
;;
neutral)
echo "BADGE_COLOR=696969" >> $GITHUB_ENV
;;
esac
- name: Create badge (Linux)
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
uses: emibcn/badge-action@d6f51ff11b5c3382b3b88689ae2d6db22d9737d1
with:
label: Tests
status: '${{ fromJSON( steps.test-results-nix.outputs.json ).formatted.stats.tests }} tests, ${{ fromJSON( steps.test-results-nix.outputs.json ).formatted.stats.runs }} runs: ${{ fromJSON( steps.test-results-nix.outputs.json ).conclusion }}'
color: ${{ env.BADGE_COLOR }}
path: badge.svg

- name: Create badge (Win/Mac)
if: ${{ always() && (matrix.os == 'macos-latest' || matrix.os == 'windows-latest') }}
uses: emibcn/badge-action@d6f51ff11b5c3382b3b88689ae2d6db22d9737d1
with:
label: Tests
status: '${{ fromJSON( steps.test-results.outputs.json ).formatted.stats.tests }} tests, ${{ fromJSON( steps.test-results.outputs.json ).formatted.stats.runs }} runs: ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}'
color: ${{ env.BADGE_COLOR }}
path: badge.svg

- name: Upload badge to Gist
# Upload only for main branch
if: >
github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main' ||
github.event_name != 'workflow_run' && github.ref == 'refs/heads/main'
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/remkop/36bc8a3b4395f2fbdb9bc271e97ba2dd
file: badge.svg


build-java-6-7:
strategy:
matrix:
Expand All @@ -45,18 +130,18 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@2e205a28d0e1da00c5f53b161f4067b052c61f34 # v1
uses: step-security/harden-runner@18bf8ad2ca49c14cbb28b91346d626ccfb00c518 # v1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v2

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1

- name: Configure JDK ${{ matrix.java-version }}
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # v2
uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@2e205a28d0e1da00c5f53b161f4067b052c61f34 # v1
uses: step-security/harden-runner@18bf8ad2ca49c14cbb28b91346d626ccfb00c518 # v1
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@ec3cf9c605b848da5f1e41e8452719eb1ccfb9a6 # v1
uses: github/codeql-action/init@a34ca99b4610d924e04c68db79e503e1f79f9f02 # v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -68,8 +68,8 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@ec3cf9c605b848da5f1e41e8452719eb1ccfb9a6 # v1
#- name: Autobuild
# uses: github/codeql-action/autobuild@a34ca99b4610d924e04c68db79e503e1f79f9f02 # v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -78,9 +78,10 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
- run: |
./gradlew build --no-daemon
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ec3cf9c605b848da5f1e41e8452719eb1ccfb9a6 # v1
uses: github/codeql-action/analyze@a34ca99b4610d924e04c68db79e503e1f79f9f02 # v1
8 changes: 4 additions & 4 deletions .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2.4.0
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v2.4.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v1.0.2
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v1.0.2
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -51,14 +51,14 @@ jobs:

# Upload the results as artifacts (optional).
- name: "Upload artifact"
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v2.3.1
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v2.3.1
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@ec3cf9c605b848da5f1e41e8452719eb1ccfb9a6 # v1.0.26
uses: github/codeql-action/upload-sarif@a34ca99b4610d924e04c68db79e503e1f79f9f02 # v1.0.26
with:
sarif_file: results.sarif
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![GitHub Release](https://img.shields.io/github/release/remkop/picocli.svg)](https://github.com/remkop/picocli/releases)
[![Maven Central](https://img.shields.io/maven-central/v/info.picocli/picocli.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22info.picocli%22%20AND%20a:%22picocli%22)
[![GitHub Actions Build Status](https://github.com/remkop/picocli/actions/workflows/ci.yml/badge.svg)](https://github.com/remkop/picocli/actions/workflows/ci.yml)
[![Tests](https://gist.githubusercontent.com/remkop/36bc8a3b4395f2fbdb9bc271e97ba2dd/raw/badge.svg)](https://github.com/remkop/picocli/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/remkop/picocli/branch/master/graph/badge.svg)](https://codecov.io/gh/remkop/picocli)
[![Follow @remkopopma](https://img.shields.io/twitter/follow/remkopopma.svg?style=social)](https://twitter.com/intent/follow?screen_name=remkopopma)
[![Follow @picocli](https://img.shields.io/twitter/follow/picocli.svg?style=social)](https://twitter.com/intent/follow?screen_name=picocli)
Expand Down Expand Up @@ -78,7 +79,7 @@ The user manual has examples of integrating with [Guice](https://picocli.info/#_

### Releases
* [All Releases](https://github.com/remkop/picocli/releases)
* Latest: 4.7.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.7.0)
* Latest: 4.7.1 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.7.1)
* Older: Picocli 4.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.0.0)
* Older: Picocli 3.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v3.0.0)
* Older: Picocli 2.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v2.0.0)
Expand All @@ -87,7 +88,7 @@ The user manual has examples of integrating with [Guice](https://picocli.info/#_
* [4.x User manual: https://picocli.info](https://picocli.info)
* [4.x Quick Guide](https://picocli.info/quick-guide.html)
* [4.x API Javadoc](https://picocli.info/apidocs/)
* [PREVIEW: Modular Javadoc for all artifacts (4.7.0-SNAPSHOT)](https://picocli.info/apidocs-all/)
* [PREVIEW: Modular Javadoc for all artifacts (4.7.1-SNAPSHOT)](https://picocli.info/apidocs-all/)
* [Command line autocompletion](https://picocli.info/autocomplete.html)
* [Programmatic API](https://picocli.info/picocli-programmatic-api.html)
* [FAQ](https://github.com/remkop/picocli/wiki/FAQ)
Expand Down Expand Up @@ -269,9 +270,9 @@ If you like picocli, help others discover picocli:
#### Spread the joy! :tada:
* Tweet about picocli! What do you like about it? How has it helped you? How is it different from the alternatives?
* Mention that your project uses picocli in the documentation of your project.
* Show that your GitHub project uses picocli, with this badge in your README.md: [![picocli](https://img.shields.io/badge/picocli-4.7.0-green.svg)](https://github.com/remkop/picocli)
* Show that your GitHub project uses picocli, with this badge in your README.md: [![picocli](https://img.shields.io/badge/picocli-4.7.1-green.svg)](https://github.com/remkop/picocli)
```
[![picocli](https://img.shields.io/badge/picocli-4.7.0-green.svg)](https://github.com/remkop/picocli)
[![picocli](https://img.shields.io/badge/picocli-4.7.1-green.svg)](https://github.com/remkop/picocli)
```

#### Preach it! :muscle:
Expand Down Expand Up @@ -362,41 +363,41 @@ See the [source code](https://github.com/remkop/picocli/blob/main/src/main/java/

### Gradle
```
implementation 'info.picocli:picocli:4.7.0'
implementation 'info.picocli:picocli:4.7.1'
```
### Maven
```
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>4.7.0</version>
<version>4.7.1</version>
</dependency>
```
### Scala SBT
```
libraryDependencies += "info.picocli" % "picocli" % "4.7.0"
libraryDependencies += "info.picocli" % "picocli" % "4.7.1"
```
### Ivy
```
<dependency org="info.picocli" name="picocli" rev="4.7.0" />
<dependency org="info.picocli" name="picocli" rev="4.7.1" />
```
### Grape
```groovy
@Grapes(
@Grab(group='info.picocli', module='picocli', version='4.7.0')
@Grab(group='info.picocli', module='picocli', version='4.7.1')
)
```
### Leiningen
```
[info.picocli/picocli "4.7.0"]
[info.picocli/picocli "4.7.1"]
```
### Buildr
```
'info.picocli:picocli:jar:4.7.0'
'info.picocli:picocli:jar:4.7.1'
```

### JBang
```
//DEPS info.picocli:picocli:4.7.0
//DEPS info.picocli:picocli:4.7.1
```

27 changes: 25 additions & 2 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# picocli Release Notes


# <a name="4.7.1"></a> Picocli 4.7.1 (UNRELEASED)
# <a name="4.7.1"></a> Picocli 4.7.1
The picocli community is pleased to announce picocli 4.7.1.

This release includes bugfixes and enhancements.
Expand All @@ -21,14 +21,37 @@ Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).
## <a name="4.7.1-new"></a> New and Noteworthy

## <a name="4.7.1-fixes"></a> Fixed issues
* [#1874][#1885][#1933] Bugfix: The `picocli-groovy` module should not declare `org.codehaus.groovy:groovy-all` as dependency. Thanks to [Mattias Andersson](https://github.com/attiand) and [Michael Kutz](https://github.com/mkutz) for raising this, and to [Paul King](https://github.com/paulk-asert) for the analysis.
* [#1886][#1896] Bugfix: AsciiDoc generator now correctly outputs options even if all options are in ArgGroups. Thanks to [Ruud Senden](https://github.com/rsenden) for the discussion and the pull request.
* [#1878][#1876] Bugfix: Annotation processor now avoids loading resource bundles at compile time. Thanks to [Ruud Senden](https://github.com/rsenden) for the discussion and the pull request.
* [#1911] Avoid using boxed boolean in `CommandLine.Interpreter.applyValueToSingleValuedField`. Thanks to [Jiehong](https://github.com/Jiehong) for the pull request.
* [#1870] Bugfix: `StringIndexOutOfBoundsException` in usage help when command has too many (and long) aliases. Thanks to [Martin](https://github.com/martlin2cz) for raising this.
* [#1904] Bugfix: Apply `fallbackValue` to vararg multi-value options, not just single-value options. Thanks to [Andreas Sewe](https://github.com/sewe) for raising this.
* [#1930] Bugfix: Ensure tests pass in environments for Java 5-18.
* [#1940] Bugfix: fix 3 failing tests in `ManPageGeneratorTest`. Thanks to [Mike Snowden](https://github.com/wtfacoconut) for the pull request.
* [#1881] DOC: Many documentation improvements. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request.
* [#1855][#1857] DOC: Add new user manual section called [Rare Use Cases](https://picocli.info/#_rare_use_cases) detailing `System.exit` usage. Thanks to [Tadaya Tsuyukubo](https://github.com/ttddyy) for the pull request.
* [#1880] DOC: Improve documentation for negatable options that are true by default. Thanks to [Sebastian Hoß](https://github.com/sebhoss) for raising this.
* [#1815] DOC: Improve user manual section for non-validating ArgGroups. Thanks for [Paul Harris](https://github.com/rolfyone) for raising this.
* [#1908] DOC: Update the user manual GraalVM section to use the new official native-maven-plugin. Thanks to [tison](https://github.com/tisonkun) for the pull request.

* [#1924] DOC: Update `picocli-codegen/README.adoc`. Thanks to [Seyyed Emad Razavi](https://github.com/razavioo) for the pull request.
* [#1910][#1917] DOC: Fix broken link to Zero Bug Commitment. Thanks to [Jiehong](https://github.com/Jiehong) for raising this and thanks to [Andreas Deininger](https://github.com/deining) for the pull request.
* [#1915] DOC: Improve default provider examples. Thanks to [David](https://github.com/DavidTheExplorer) for raising this.
* [#1918][#1920] DOC: Removed unused Travis CI badge and associated broken link from README. Thanks to [Andreas Deininger](https://github.com/deining) for raising this and the pull request.
* [#706] DOC: Add GitHub badge with test count to README.
* [#1939] BUILD: Fix `picocli-annotation-processing-tests` failures on Java 16+: rewrite tests to avoid Google `compiler-test` API that internally uses `com.sun.tools.javac.util.Context`.
* [#1887] DEP: Bump biz.aQute.bnd.gradle from 6.3.1 to 6.4.0
* [#1865] DEP: Bump ivy from 2.5.0 to 2.5.1
* [#1931] DEP: Bump springBootVersion from 2.7.5 to 3.0.2
* [#1929] DEP: Bump github/codeql-action from 2.1.29 to 2.1.39
* [#1926] DEP: Bump step-security/harden-runner from 1.5.0 to 2.1.0
* [#1914] DEP: Bump actions/checkout from 3.1.0 to 3.3.0
* [#1897] DEP: Bump actions/setup-java from 3.6.0 to 3.9.0
* [#1902] DEP: Bump ossf/scorecard-action from 2.0.6 to 2.1.2
* [#1938] DEP: Bump actions/upload-artifact from 3.1.1 to 3.1.2
* [#1937] DEP: Bump asciidoctorj-pdf from 2.3.3 to 2.3.4
* [#1936] DEP: Bump jline from 3.21.0 to 3.22.0
* [#1935] DEP: Bump compile-testing from 0.19 to 0.21.0

## <a name="4.7.1-deprecated"></a> Deprecations
No features were deprecated in this release.
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ buildscript {

dependencies {
classpath "org.asciidoctor:asciidoctor-gradle-jvm:$asciidoctorGradlePluginVersion"
classpath 'org.asciidoctor:asciidoctorj-pdf:2.3.3'
classpath 'org.asciidoctor:asciidoctorj-pdf:2.3.4'
classpath "org.beryx:badass-jar:2.0.0"
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:6.3.1'
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:6.4.0'
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0"
}
}
Expand Down
Loading

0 comments on commit 5b1cbc8

Please sign in to comment.