From dab9b447915342aa4b9525dc14b14bc73fbbd1a8 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:59:03 -0600 Subject: [PATCH] fix: style make targets to pass during release --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish.yml | 4 ++-- Makefile | 11 +++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26edc34c3..6ab3fb2ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,8 +76,8 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - name: Install style guide - run: make install-styleguide + - name: Install checkstyle and style guide + run: make install-checkstyle - name: Load Maven dependencies and CVE database cache uses: actions/cache@v3 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d347b5f7a..866e8912a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,8 +44,8 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - - name: Publish to Apache Maven Central - run: mvn deploy + - name: Clean, build and publish to Apache Maven Central + run: make install-styleguide publish pass=${{ secrets.MAVEN_GPG_PASSPHRASE }} env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} diff --git a/Makefile b/Makefile index e3e2c4491..c4e40fae9 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,12 @@ docs: mvn install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djacoco.skip=true cp -R target/apidocs/ ./docs/ -## install-styleguide - Install style guides and CheckStyle utilities (Unix only) -install-styleguide: | update-examples-submodule +## install-checkstyle - Install the Checkstyle tool (Unix only) +install-checkstyle: | install-styleguide curl -LJs https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.3.1/checkstyle-10.3.1-all.jar -o checkstyle.jar + +## install-styleguide - Install style guides +install-styleguide: | init-examples-submodule sh examples/symlink_directory_files.sh examples/style_guides/java . ## init-examples-submodule - Initialize the examples submodule @@ -34,7 +37,7 @@ init-examples-submodule: git submodule update ## install - Install requirements -install: | init-examples-submodule +install: | install-checkstyle ## lint - Lints the project lint: checkstyle scan @@ -70,4 +73,4 @@ update-examples-submodule: git submodule init git submodule update --remote -.PHONY: help build clean coverage docs install-styleguide install lint publish publish-dry release scan scan-strict test update-examples-submodule +.PHONY: help build clean coverage docs install-checkstyle install-styleguide install lint publish publish-dry release scan scan-strict test update-examples-submodule