From 62d1662993c44f45ded0fde48b6ebeb9e0ef8069 Mon Sep 17 00:00:00 2001 From: Deepanjan Bhattacharyya Date: Fri, 8 Mar 2024 11:10:14 -0800 Subject: [PATCH 1/2] Fix missing qoutes for Valid Numbers --- src/main/java/gyro/doclet/ResourceDocGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gyro/doclet/ResourceDocGenerator.java b/src/main/java/gyro/doclet/ResourceDocGenerator.java index 18d67d0..081101e 100644 --- a/src/main/java/gyro/doclet/ResourceDocGenerator.java +++ b/src/main/java/gyro/doclet/ResourceDocGenerator.java @@ -562,7 +562,7 @@ private String addValidationAnnotationMessage(MethodDoc methodDoc, String commen // Replace last "," with an "or" if (validNumberList.size() > 1) { validNumber = String.format( - "Valid values are ``%s %s%s`.", + "Valid values are ``%s %s%s``.", validNumber.substring(0, validNumber.lastIndexOf(",")), (isCollection ? "and" : "or"), validNumber.substring(validNumber.lastIndexOf(",") + 1)); From 8935f467024a3d6cfb34c363bf88693f07b6b91c Mon Sep 17 00:00:00 2001 From: Deepanjan Bhattacharyya Date: Fri, 8 Mar 2024 11:10:24 -0800 Subject: [PATCH 2/2] Use gha for builds --- .github/workflows/gyro-doclet.yml | 39 +++++++++++++++++++++++++++++++ .travis.yml | 17 -------------- build.gradle | 8 ++++--- 3 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/gyro-doclet.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/gyro-doclet.yml b/.github/workflows/gyro-doclet.yml new file mode 100644 index 0000000..40af00d --- /dev/null +++ b/.github/workflows/gyro-doclet.yml @@ -0,0 +1,39 @@ +name: gyro-doclet + +on: + push: + branches: + - master + - release/* + tags: + - release/* + + pull_request: + branches: + - master + - release/* + +env: + GITHUB_ACTIONS_PULL_REQUEST: ${{ github.event.pull_request.number }} + GRADLE_DEPLOY_USER: ${{ secrets.GRADLE_DEPLOY_USER }} + GRADLE_DEPLOY_PASSWORD: ${{ secrets.GRADLE_DEPLOY_PASSWORD }} + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'temurin' + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 56f83ca..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: false - -if: type = push - -branches: - only: - - master - - /^release\/.*/ - -language: java - -jdk: - - openjdk11 - -install: true - -script: ./gradlew diff --git a/build.gradle b/build.gradle index 3c119f3..88bc10d 100644 --- a/build.gradle +++ b/build.gradle @@ -23,16 +23,18 @@ plugins { id 'checkstyle' } -def releaseVersion = '1.0.1' +def releaseVersion = '1.1.0' def releaseBuild = false; defaultTasks 'shadowJar' -if (System.getenv('TRAVIS_BRANCH') && System.getenv('TRAVIS_PULL_REQUEST') == 'false') { +if (System.getenv('CI')) { defaultTasks 'build', 'publish' check.dependsOn 'publish' publish.dependsOn 'shadowJar' - releaseBuild = System.getenv('TRAVIS_BRANCH').startsWith("release/"); + + releaseBuild = System.getenv('GITHUB_ACTIONS_PULL_REQUEST') == '' && + System.getenv('GITHUB_REF').startsWith("refs/head/release/"); } else { defaultTasks 'build', 'publishToMavenLocal' check.dependsOn 'publishToMavenLocal'