-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from sentrysoftware/feature/update-README-site…
…-CONTRIBUTE Updated documentation
- Loading branch information
Showing
6 changed files
with
300 additions
and
307 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,63 @@ | ||
# Contributing | ||
|
||
## Boost vs LGPL vs GPL | ||
|
||
The original code from Danny Daglas was under the Boost Software License. The current code is now mainly under LGPL, which means it's actually GPLv3, but can be used in non-GPL projects. | ||
|
||
**Important:** | ||
## How to build | ||
|
||
* The `Jawk.jar`` executable artifact is released under strict GPLv3. | ||
* The `jawk`` Maven artifact is released under LGPL and can be used in non-GPL projects. | ||
Requirements: | ||
|
||
Each file includes a license header. Make sure to always include this header. | ||
* [Java 11](https://adoptium.net/) | ||
* [Maven 3.x](https://maven.apache.org/) | ||
|
||
To update all Java files to include the header, simply use the command below: | ||
As usual with Maven, you compile, build and test with: | ||
|
||
```bash | ||
$ mvn license:update-file-header | ||
mvn verify | ||
``` | ||
|
||
## How to build | ||
2 artifacts are built: | ||
|
||
Jawk uses Maven 2+ as build system, which you have to install first. | ||
If you did so, you can: | ||
* `jawk-<VERSION>.jar`, to be used in downstream projects requiring Jawk | ||
* `jawk-<VERSION>-standalone.jar`, an executable JAR that behaves like `awk` or `gawk` | ||
|
||
compile & package: | ||
The [documentation](sentrysoftware.github.io/Jawk) is generated with Maven too: | ||
|
||
mvn package | ||
|
||
execute: | ||
```bash | ||
mvn site | ||
``` | ||
|
||
mvn exec:java | ||
For more information about Maven-generated documentation, visit [Maven Site plugin](https://maven.apache.org/plugins/maven-site-plugin/) and [Sentry Maven Skin](https://sentrysoftware.github.io/sentry-maven-skin/). | ||
|
||
create project documentation (to be found under `target/site/index.html`): | ||
## Development workflows | ||
|
||
mvn site | ||
Please follow this workflow to contribute to this project: | ||
|
||
Jawk relies on [BCEL](http://commons.apache.org/bcel/) for parsing AWK scripts. | ||
* Create an issue describing either the problem you're trying to fix, or the feature you would like to add. | ||
* Wait for a feedback from the team, to validate your suggested change will be approved by the maintainer. | ||
* Fork the repository. | ||
* Create a `feature/issue-<NUMBER>-short-description` from the `main` branch. | ||
* **Make sure the project builds with your changes and passes the unit tests!** | ||
* Commit with a clear and concise messages: `Fix issue #NUMBER: ...`. | ||
* Create Pull Request from your branch to the main branch of this repository. | ||
* Wait for the feedback and review! | ||
|
||
In this repository, we prefer **merging** over **rebasing**, and **tabs** over **spaces**. Don't fight against it. | ||
|
||
## Release | ||
|
||
### Prepare "target/" for the release process | ||
|
||
mvn release:clean | ||
|
||
### Prepare the release | ||
* asks for the release and new snapshot versions to use (for all modules) | ||
* packages | ||
* signs with GPG | ||
* commits | ||
* tags | ||
* pushes to origin | ||
The release to [Maven Central](https://central.sonatype.com/) must be performed using the *Release to Maven Central* GitHub Action, which relies on the shared [Maven Central Release](https://github.com/sentrysoftware/workflows/blob/main/README.md#maven-central-release). | ||
|
||
mvn release:prepare | ||
## Licenses | ||
|
||
### Perform the release | ||
* checks-out the release tag | ||
* builds | ||
* deploy into Sonatype staging repository | ||
|
||
mvn release:perform | ||
The original code from Danny Daglas was under the Boost Software License. The current code is now mainly under LGPL, which means it's actually GPLv3, but can be used in non-GPL projects. | ||
|
||
### Promote it on Maven | ||
Moves it from the Sonatype staging to the main Sonatype repo. | ||
**Important:** | ||
|
||
1. using the Nexus staging plugin: | ||
* The `Jawk.jar` executable artifact is released under strict GPLv3. | ||
* The `jawk` Maven artifact is released under LGPL and can be used in non-GPL projects. | ||
|
||
mvn nexus:staging-close | ||
mvn nexus:staging-release | ||
Each file includes a license header. Make sure to always include this header. | ||
|
||
2. ... alternatively, using the web-interface: | ||
* firefox https://oss.sonatype.org | ||
* login | ||
* got to the "Staging Repositories" tab | ||
* select "org.sentrysoftware..." | ||
* "Close" it | ||
* select "org.sentrysoftware.jawk..." again | ||
* "Release" it | ||
To update all Java files to include the header, simply use the command below: | ||
|
||
```bash | ||
mvn license:update-file-header | ||
``` |
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
Oops, something went wrong.