From 550a2d7ad791cc4612ce79a4a543ae5007cf8004 Mon Sep 17 00:00:00 2001 From: "Gunnar Inge G. Sortland" Date: Fri, 20 Oct 2023 11:11:38 +0200 Subject: [PATCH] Add pre-commit and format XML --- .github/workflows/pre-commit.yml | 16 +++ .github/workflows/publish-npm.yml | 1 - .pre-commit-config.yaml | 11 +++ wgtwo/callforward/v0/callforward.proto | 1 - wgtwo/pom-v0.xml | 130 +++++++++++++------------ wgtwo/pom-v1.xml | 68 +++++++------ 6 files changed, 132 insertions(+), 95 deletions(-) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..701c45f --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,16 @@ +name: pre-commit + +on: + push: + branches: + - 'master' + pull_request: {} + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: pre-commit + uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 479c497..0b6ba8a 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -49,4 +49,3 @@ jobs: access: public dry-run: false check-version: true - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..073969c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-xml + - id: check-added-large-files diff --git a/wgtwo/callforward/v0/callforward.proto b/wgtwo/callforward/v0/callforward.proto index cb67738..68e5d6c 100644 --- a/wgtwo/callforward/v0/callforward.proto +++ b/wgtwo/callforward/v0/callforward.proto @@ -102,4 +102,3 @@ message CallForwardingResponse { string error_message = 2; } - diff --git a/wgtwo/pom-v0.xml b/wgtwo/pom-v0.xml index 7a2bd10..96b99ad 100644 --- a/wgtwo/pom-v0.xml +++ b/wgtwo/pom-v0.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -29,46 +30,48 @@ - UTF-8 - 1.8 - 1.57.2 - true - 3.0.1 + UTF-8 + 1.8 + 1.57.2 + true + 3.0.1 - scm:git:git@github.com:working-group-two/wgtwoapis.git - scm:git:[push=]git@github.com:working-group-two/wgtwoapis.git[fetch=]git@github.com:working-group-two/wgtwoapis.git - https://github.com/working-group-two/wgtwoapis.git - HEAD + scm:git:git@github.com:working-group-two/wgtwoapis.git + + scm:git:[push=]git@github.com:working-group-two/wgtwoapis.git[fetch=]git@github.com:working-group-two/wgtwoapis.git + + https://github.com/working-group-two/wgtwoapis.git + HEAD - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + - - - io.grpc - grpc-bom - ${grpc.version} - pom - import - - - javax.annotation - javax.annotation-api - 1.3.2 - - + + + io.grpc + grpc-bom + ${grpc.version} + pom + import + + + javax.annotation + javax.annotation-api + 1.3.2 + + @@ -85,7 +88,8 @@ 0.6.1 ${maven.multiModuleProjectDirectory} - com.google.protobuf:protoc:3.21.12:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.21.12:exe:${os.detected.classifier} + grpc-java io.grpc:protoc-gen-grpc-java:1.52.1:exe:${os.detected.classifier} @@ -116,8 +120,10 @@ maven-release-plugin ${maven-release-plugin.version} - [RELEASE] - v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} + [RELEASE] + + v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} + pom-v0.xml @@ -158,7 +164,7 @@ - false + false @@ -187,39 +193,39 @@ - - org.apache.maven.plugins - maven-gpg-plugin - - - org.apache.maven.plugins - maven-javadoc-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.sonatype.plugins - nexus-staging-maven-plugin - + + org.apache.maven.plugins + maven-gpg-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + org.apache.maven.plugins + maven-source-plugin + + + org.sonatype.plugins + nexus-staging-maven-plugin + - - The Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + - - WG2 Products Team - products@wgtwo.com - Working Group Two - https://www.wgtwo.com - + + WG2 Products Team + products@wgtwo.com + Working Group Two + https://www.wgtwo.com + diff --git a/wgtwo/pom-v1.xml b/wgtwo/pom-v1.xml index c8971f6..2dfa01c 100644 --- a/wgtwo/pom-v1.xml +++ b/wgtwo/pom-v1.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -33,7 +34,9 @@ scm:git:git@github.com:working-group-two/wgtwoapis.git - scm:git:[push=]git@github.com:working-group-two/wgtwoapis.git[fetch=]git@github.com:working-group-two/wgtwoapis.git + + scm:git:[push=]git@github.com:working-group-two/wgtwoapis.git[fetch=]git@github.com:working-group-two/wgtwoapis.git + https://github.com/working-group-two/wgtwoapis.git v1.10.1 @@ -80,7 +83,8 @@ 0.6.1 ${maven.multiModuleProjectDirectory} - com.google.protobuf:protoc:3.21.12:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.21.12:exe:${os.detected.classifier} + grpc-java io.grpc:protoc-gen-grpc-java:1.52.1:exe:${os.detected.classifier} @@ -111,8 +115,10 @@ maven-release-plugin ${maven-release-plugin.version} - [RELEASE] - v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} + [RELEASE] + + v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} + pom-v1.xml @@ -182,39 +188,39 @@ - - org.apache.maven.plugins - maven-gpg-plugin - - - org.apache.maven.plugins - maven-javadoc-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.sonatype.plugins - nexus-staging-maven-plugin - + + org.apache.maven.plugins + maven-gpg-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + org.apache.maven.plugins + maven-source-plugin + + + org.sonatype.plugins + nexus-staging-maven-plugin + - - The Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + - - WG2 Products Team - products@wgtwo.com - Working Group Two - https://www.wgtwo.com - + + WG2 Products Team + products@wgtwo.com + Working Group Two + https://www.wgtwo.com +