Repository navigation
PHOEBUS-DEV-003: Add Pre-commit Checks to PR Template and Docs #3971
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ mvn clean verify -f dependencies/pom.xml | |
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Future problem, but I think moving 'developer'/'contributor' docs out of the README and into a CONTRIBUTING.md and then the README is for 'users'. |
||
| ## Building with maven | ||
|
|
||
| Define the JAVA_HOME environment variable to point to your Java installation directory. | ||
| Define the JAVA_HOME environment variable to point to your Java installation directory. | ||
| Mac OS users should use something like: | ||
| ``` | ||
| export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-21.0.11+10/Contents/Home | ||
|
|
@@ -52,14 +52,49 @@ Set the environment variable `LANG` to `en_US.UTF-8` | |
| to execute tests in a specific locale, | ||
| or build with `mvn -DskipTests ...` to skip tests. | ||
|
|
||
| ### Running the phoebus application | ||
| ### Running the phoebus application | ||
|
|
||
| To run the product jar | ||
| ``` | ||
| cd phoebus-product/target | ||
| java -jar product-*-SNAPSHOT.jar | ||
| ``` | ||
|
|
||
| ### Pre-commit | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would actually recommend https://prek.j178.dev/ over pre-commit. Its much faster (does checks in parallel) but supports the same pre-commit files. |
||
| This project uses pre-commit to run automated checks defined in .pre-commit-config.yaml before changes are committed. | ||
|
|
||
| #### Installation | ||
| If you have _pip_ installed: | ||
| ``` | ||
| pip install pre-commit | ||
| ``` | ||
|
|
||
| - On Debian: | ||
| ``` | ||
| apt install pre-commit | ||
| ``` | ||
| - On macOs: | ||
| ``` | ||
| brew install pre-commit | ||
| ``` | ||
| - On Windows: | ||
| ``` | ||
| ## If you have pipx installed - To be confirmed | ||
| py -m pipx ensurepath | ||
| pipx install pre-commit | ||
| ``` | ||
| #### Set up the Git hook | ||
| ``` | ||
| pre-commit install | ||
| ``` | ||
| Once set up, the pre-commit automatically runs before each commit. | ||
|
|
||
| #### Run the check manually | ||
| ``` | ||
| pre-commit run | ||
| ``` | ||
|
|
||
|
|
||
| ## Building with ant | ||
|
|
||
| ``` | ||
|
|
@@ -253,20 +288,20 @@ Create a sonatype account and update the maven settings.xml file with your sonat | |
| </servers> | ||
| ``` | ||
|
|
||
| **Prepare the release** | ||
| `mvn release:prepare` | ||
| **Prepare the release** | ||
| `mvn release:prepare` | ||
| In this step will ensure there are no uncommitted changes, ensure the versions number are correct, tag the scm, etc. | ||
| A full list of checks is documented [here](https://maven.apache.org/maven-release/maven-release-plugin/usage/prepare-release.html). | ||
|
|
||
| **Perform the release** | ||
| `mvn -Darguments="-Dskip-executable-jar" -Pdocs,releases release:perform` | ||
| **Perform the release** | ||
| `mvn -Darguments="-Dskip-executable-jar" -Pdocs,releases release:perform` | ||
| Checkout the release tag, build, sign and push the build binaries to sonatype. The `docs` profile is needed in order | ||
| to create required javadocs jars. | ||
|
|
||
| **Publish** | ||
| **Publish** | ||
| Open the staging repository in [sonatype](https://s01.oss.sonatype.org/#stagingRepositories) and hit the *publish* button | ||
|
|
||
| **Note:** | ||
| In order to keep the ant and maven builds in sync, before the prepare:release update the `version` in the | ||
| dependencies\ant_settings.xml to match the release version number. After the release is completed the `version` should | ||
| In order to keep the ant and maven builds in sync, before the prepare:release update the `version` in the | ||
| dependencies\ant_settings.xml to match the release version number. After the release is completed the `version` should | ||
| updated to match the next development snapshotData version. | ||
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.
Do we really need to have in the PR template that the github actions pass? Shouldn't that just be part of the settings of the project?