-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt to Java 17 and 21 #72
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
28ea481
Update dependencies
kaklakariada 9da2bec
Add javadoc comments
kaklakariada cbde842
Mark ExitGuard as deprecated
kaklakariada bdb1e98
Add changelog entry
kaklakariada c25de4c
Fix sonar findings
kaklakariada 68c23dd
Fix typo
kaklakariada 1ee3eae
Fix broken imports
kaklakariada 9a0b423
Update release process
kaklakariada 46fee3e
Fix sonar warnings
kaklakariada 06d0967
Update src/main/java/org/itsallcode/junit/sysextensions/security/Exit…
kaklakariada a0acd61
Update release date
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
base_dir="$( cd "$(dirname "$0")/../.." >/dev/null 2>&1 ; pwd -P )" | ||
readonly base_dir | ||
readonly pom_file="$base_dir/pom.xml" | ||
|
||
# Read project version from pom file | ||
project_version=$(grep "<version>" "$pom_file" | sed --regexp-extended 's/\s*<version>(.*)<\/version>\s*/\1/g' | head --lines=1) | ||
readonly project_version | ||
echo "Read project version '$project_version' from $pom_file" | ||
|
||
readonly changes_file="$base_dir/doc/changes/changes_${project_version}.md" | ||
notes=$(cat "$changes_file") | ||
readonly notes | ||
|
||
readonly title="Release $project_version" | ||
readonly tag="$project_version" | ||
echo "Creating release:" | ||
echo "Git tag : $tag" | ||
echo "Title : $title" | ||
echo "Changes file : $changes_file" | ||
|
||
release_url=$(gh release create --latest --title "$title" --notes "$notes" --target main "$tag") | ||
readonly release_url | ||
echo "Release URL: $release_url" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
skip-deploy-maven-central: | ||
description: "Skip deployment to Maven Central" | ||
required: true | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: "bash" | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: false | ||
permissions: | ||
contents: write # Required for creating GitHub release | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Fail if not running on main branch | ||
if: ${{ github.ref != 'refs/heads/main' }} | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
core.setFailed('Not running on main branch, github.ref is ${{ github.ref }}. Please start this workflow only on main') | ||
|
||
- name: Set up Maven Central Repository | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 17 | ||
cache: "maven" | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Build | ||
run: mvn --batch-mode -T 1C clean install | ||
|
||
- name: List secret GPG keys | ||
run: gpg --list-secret-keys | ||
|
||
- name: Publish to Maven Central Repository | ||
if: ${{ !inputs.skip-deploy-maven-central }} | ||
run: mvn --batch-mode deploy -Possrh -DstagingDescription="Deployed via GitHub workflow release.yml" | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | ||
|
||
- name: Create GitHub Release | ||
run: ./.github/workflows/github_release.sh | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
package org.itsallcode.io; | ||
|
||
/** | ||
* Interface for classes that can capture output. | ||
*/ | ||
public interface Capturable | ||
{ | ||
/** | ||
* Activate capturing | ||
*/ | ||
public void capture(); | ||
void capture(); | ||
|
||
/** | ||
* Activate muted capturing, i.e. don't forward output to the underlying | ||
* output stream. This can be useful to speedup tests. | ||
*/ | ||
public void captureMuted(); | ||
void captureMuted(); | ||
|
||
/** | ||
* Get the data that was captured. | ||
* | ||
* @return captured data. | ||
*/ | ||
public String getCapturedData(); | ||
String getCapturedData(); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this? I always found this notation inconsistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sonar complains about this. Interface methods are public by default.