From d46eebe0beaed3e49e52a5eb8efbd2973d95d6a8 Mon Sep 17 00:00:00 2001 From: Lucas Brand Date: Mon, 17 Nov 2025 14:01:43 -0300 Subject: [PATCH 01/15] =?UTF-8?q?feat:=20cns=20agora=20pode=20come=C3=A7ar?= =?UTF-8?q?=20com=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../br/ufsc/bridge/platform/validation/rules/CnsRule.java | 2 +- src/main/script/rules/cns.ts | 2 +- .../br/ufsc/bridge/platform/validation/rules/CnsTest.java | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/br/ufsc/bridge/platform/validation/rules/CnsRule.java b/src/main/java/br/ufsc/bridge/platform/validation/rules/CnsRule.java index f95a6ce..8045531 100644 --- a/src/main/java/br/ufsc/bridge/platform/validation/rules/CnsRule.java +++ b/src/main/java/br/ufsc/bridge/platform/validation/rules/CnsRule.java @@ -6,7 +6,7 @@ public class CnsRule implements Rule { private final static String CNS1 = "^[1-2][0-9]{10}00[0-1][0-9]$"; - private final static String CNS2 = "^[7-9][0-9]{14}$"; + private final static String CNS2 = "^[57-9][0-9]{14}$"; @Override public String validate(String value) { if (!Util.isEmpty(value) && !this.isValid(value)) { diff --git a/src/main/script/rules/cns.ts b/src/main/script/rules/cns.ts index 95f7593..cbfc70c 100644 --- a/src/main/script/rules/cns.ts +++ b/src/main/script/rules/cns.ts @@ -3,7 +3,7 @@ import { msg } from '..' import { length } from './length' const CNS1 = '^[1-2][0-9]{10}00[0-1][0-9]$' -const CNS2 = '^[7-9][0-9]{14}$' +const CNS2 = '^[57-9][0-9]{14}$' function somaPonderada(cnsValue: string) { let soma = 0 diff --git a/src/test/java/br/ufsc/bridge/platform/validation/rules/CnsTest.java b/src/test/java/br/ufsc/bridge/platform/validation/rules/CnsTest.java index 7fb355c..35eebc7 100644 --- a/src/test/java/br/ufsc/bridge/platform/validation/rules/CnsTest.java +++ b/src/test/java/br/ufsc/bridge/platform/validation/rules/CnsTest.java @@ -18,6 +18,8 @@ public void testarRequired() { public void testarValorDeCns() { Assert.assertNull("975055825130003 é um Cns válido", this.validate("975055825130003", Rules.cns)); + Assert.assertNull("586309087428878 é um Cns válido", this.validate("586309087428878", Rules.cns)); + Assert.assertNull("118725165660004 é um Cns válido", this.validate("118725165660004", Rules.cns)); Assert.assertNull("218342347130008 é um Cns válido", this.validate("218342347130008", Rules.cns)); @@ -30,6 +32,8 @@ public void testarValorDeCns() { Assert.assertNotNull("O Cns é invalido", this.validate("109878998754646", Rules.cns)); + Assert.assertNotNull("O Cns é invalido", this.validate("594516874912612", Rules.cns)); + Assert.assertNotNull("O Cns é invalido", this.validate("236951545487965", Rules.cns)); Assert.assertNotNull("O Cns é invalido", this.validate("478976532213336", Rules.cns)); @@ -46,8 +50,6 @@ public void testarValorDeCns() { Assert.assertNotNull("O Cns não pode comeaçar com 4", this.validate("431439904710009", Rules.cns)); - Assert.assertNotNull("O Cns não pode comeaçar com 5", this.validate("562593396660002", Rules.cns)); - Assert.assertNotNull("O Cns não pode comeaçar com 6", this.validate("667429114440003", Rules.cns)); Assert.assertNotNull("111111111111111 não é um Cns válido", this.validate("111111111111111", Rules.cns)); From 9924ebdca43047f9be2052c27cf97f208c07d4cc Mon Sep 17 00:00:00 2001 From: Lucas Brand Date: Wed, 19 Nov 2025 14:21:20 -0300 Subject: [PATCH 02/15] fix: versao do uses do action/cache --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e80bc24..440f614 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,7 +21,7 @@ jobs: distribution: 'zulu' - name: Cache local Maven repository - uses: actions/cache@v2.1.6 + uses: actions/cache@v3 with: path: ~/.m2/ key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} From 8aac5f3077147813ef1a19361e9cc70e04249d34 Mon Sep 17 00:00:00 2001 From: Matheus Dias <1726247+matheusdias@users.noreply.github.com> Date: Mon, 24 Nov 2025 14:58:00 -0300 Subject: [PATCH 03/15] Update Codecov action in Maven workflow --- .github/workflows/maven.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 440f614..a04f541 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -29,5 +29,8 @@ jobs: - name: Build with Maven run: mvn clean verify - - name: Upload codecov report - uses: codecov/codecov-action@v1.5.2 + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} From 668fe39e9caf9e0804a51fc1f6699727d3497e65 Mon Sep 17 00:00:00 2001 From: Matheus Dias <1726247+matheusdias@users.noreply.github.com> Date: Mon, 24 Nov 2025 17:06:31 -0300 Subject: [PATCH 04/15] Update Codecov action in Maven workflow --- .github/workflows/maven.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a04f541..8a642c2 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -29,8 +29,7 @@ jobs: - name: Build with Maven run: mvn clean verify - - name: Upload test results to Codecov - if: ${{ !cancelled() }} - uses: codecov/test-results-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 523c687fa39f485ded2b8e26cac909c120cb07be Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 16:07:16 -0300 Subject: [PATCH 05/15] feat: update pom para realizar deploy --- pom.xml | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/pom.xml b/pom.xml index 7af593c..eb18255 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 br.ufsc.bridge @@ -87,6 +88,18 @@ + + + + repo-bridge + https://repositorio.bridge.ufsc.br/repository/snapshots/ + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + @@ -219,9 +232,6 @@ 2.5.3 true - false - ossrh - deploy @{project.version} @@ -230,15 +240,8 @@ - - ossrh - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - + release @@ -258,24 +261,9 @@ - - - - repo-bridge - - - repo-bridge - ${env.NEXUS_PUBLIC_URL} - - - repo-bridge - ${env.NEXUS_SNAPSHOT_URL} - - - - + scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git From 13da37dca8b9c11f1502b58405e7366caaa4f13c Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 16:58:05 -0300 Subject: [PATCH 06/15] [maven-release-plugin] prepare release 1.4.11 --- pom.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index eb18255..6589647 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,9 @@ - + 4.0.0 br.ufsc.bridge validation - 1.4.11-SNAPSHOT + 1.4.11 jar Bridge Platform - Validation @@ -267,6 +266,6 @@ scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git - HEAD + 1.4.11 From f83ec8d3391a53d75c007c476c29451b5b58994e Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 16:58:11 -0300 Subject: [PATCH 07/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6589647..0c961eb 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ br.ufsc.bridge validation - 1.4.11 + 1.4.12-SNAPSHOT jar Bridge Platform - Validation @@ -266,6 +266,6 @@ scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git - 1.4.11 + HEAD From 315d97d566019630e04c71b9927fc8dc2105b065 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 17:22:00 -0300 Subject: [PATCH 08/15] [maven-release-plugin] prepare release 1.4.12 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0c961eb..51740d2 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ br.ufsc.bridge validation - 1.4.12-SNAPSHOT + 1.4.12 jar Bridge Platform - Validation @@ -266,6 +266,6 @@ scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git - HEAD + 1.4.12 From ad83b13e2c18458f7540d724bfa5e51e76a3a41b Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 17:22:04 -0300 Subject: [PATCH 09/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 51740d2..e0040cc 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ br.ufsc.bridge validation - 1.4.12 + 1.4.13-SNAPSHOT jar Bridge Platform - Validation @@ -266,6 +266,6 @@ scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git - 1.4.12 + HEAD From 3f60792ce8f9d21d1313cab243136334357f6084 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 17:31:49 -0300 Subject: [PATCH 10/15] [maven-release-plugin] prepare release 1.4.13 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e0040cc..ae1a507 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ br.ufsc.bridge validation - 1.4.13-SNAPSHOT + 1.4.13 jar Bridge Platform - Validation @@ -266,6 +266,6 @@ scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git - HEAD + 1.4.13 From cfc458761bf3d79ba658c9be7daa766b0bfb7ec2 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 17:31:54 -0300 Subject: [PATCH 11/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ae1a507..bd9752e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ br.ufsc.bridge validation - 1.4.13 + 1.4.14-SNAPSHOT jar Bridge Platform - Validation @@ -266,6 +266,6 @@ scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git - 1.4.13 + HEAD From 5e7dbf4b8ffec75ff02928c2f6b01c54e455adbb Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 17:55:36 -0300 Subject: [PATCH 12/15] fix: try nova form de fazer publish para o central --- pom.xml | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index bd9752e..5b0cd85 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 br.ufsc.bridge @@ -88,17 +89,6 @@ - - - repo-bridge - https://repositorio.bridge.ufsc.br/repository/snapshots/ - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - @@ -214,14 +204,12 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 + org.sonatype.central + central-publishing-maven-plugin + 0.9.0 true - ossrh - https://oss.sonatype.org/ - true + central From e96ca7728aa1755a1c08e14e97c2b4a3ec7a56cf Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 17:55:58 -0300 Subject: [PATCH 13/15] [maven-release-plugin] prepare release 1.4.14 --- pom.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 5b0cd85..7becb69 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,9 @@ - + 4.0.0 br.ufsc.bridge validation - 1.4.14-SNAPSHOT + 1.4.14 jar Bridge Platform - Validation @@ -254,6 +253,6 @@ scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git - HEAD + 1.4.14 From 7a8de1dd3c5b15b05febc9606872dfa058e31c48 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 17:56:04 -0300 Subject: [PATCH 14/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7becb69..ff30608 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ br.ufsc.bridge validation - 1.4.14 + 1.4.15-SNAPSHOT jar Bridge Platform - Validation @@ -253,6 +253,6 @@ scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git scm:git:git@github.com:laboratoriobridge/validation.git - 1.4.14 + HEAD From 73e1d858e67e50cf7ca73f4eb1dff135e17af887 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 1 Dec 2025 18:19:31 -0300 Subject: [PATCH 15/15] fix: merge da025a6 --- .github/workflows/maven.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index d840050..bb97a0e 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -28,7 +28,7 @@ jobs: - name: Build with Maven run: mvn clean verify - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}