Skip to content

Commit

Permalink
Add pre-commit and format XML
Browse files Browse the repository at this point in the history
  • Loading branch information
gi-wg2 committed Oct 20, 2023
1 parent d46f4a2 commit 550a2d7
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 95 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
1 change: 0 additions & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ jobs:
access: public
dry-run: false
check-version: true

11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion wgtwo/callforward/v0/callforward.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,3 @@ message CallForwardingResponse {

string error_message = 2;
}

130 changes: 68 additions & 62 deletions wgtwo/pom-v0.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -29,46 +30,48 @@
</modules>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<grpc.version>1.57.2</grpc.version>
<maven.deploy.skip>true</maven.deploy.skip>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<grpc.version>1.57.2</grpc.version>
<maven.deploy.skip>true</maven.deploy.skip>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
</properties>

<scm>
<connection>scm:git:[email protected]:working-group-two/wgtwoapis.git</connection>
<developerConnection>scm:git:[push=][email protected]:working-group-two/wgtwoapis.git[fetch=][email protected]:working-group-two/wgtwoapis.git</developerConnection>
<url>https://github.com/working-group-two/wgtwoapis.git</url>
<tag>HEAD</tag>
<connection>scm:git:[email protected]:working-group-two/wgtwoapis.git</connection>
<developerConnection>
scm:git:[push=][email protected]:working-group-two/wgtwoapis.git[fetch=][email protected]:working-group-two/wgtwoapis.git
</developerConnection>
<url>https://github.com/working-group-two/wgtwoapis.git</url>
<tag>HEAD</tag>
</scm>

<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>${grpc.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>${grpc.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
Expand All @@ -85,7 +88,8 @@
<version>0.6.1</version>
<configuration>
<protoSourceRoot>${maven.multiModuleProjectDirectory}</protoSourceRoot>
<protocArtifact>com.google.protobuf:protoc:3.21.12:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:3.21.12:exe:${os.detected.classifier}
</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.52.1:exe:${os.detected.classifier}
</pluginArtifact>
Expand Down Expand Up @@ -116,8 +120,10 @@
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<scmCommentPrefix>[RELEASE] </scmCommentPrefix>
<tagNameFormat>v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</tagNameFormat>
<scmCommentPrefix>[RELEASE]</scmCommentPrefix>
<tagNameFormat>
v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}
</tagNameFormat>
<pomFileName>pom-v0.xml</pomFileName>
</configuration>
</plugin>
Expand Down Expand Up @@ -158,7 +164,7 @@
</execution>
</executions>
<configuration>
<failOnError>false</failOnError>
<failOnError>false</failOnError>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -187,39 +193,39 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<developers>
<developer>
<name>WG2 Products Team</name>
<email>[email protected]</email>
<organization>Working Group Two</organization>
<organizationUrl>https://www.wgtwo.com</organizationUrl>
</developer>
<developer>
<name>WG2 Products Team</name>
<email>[email protected]</email>
<organization>Working Group Two</organization>
<organizationUrl>https://www.wgtwo.com</organizationUrl>
</developer>
</developers>

</project>
68 changes: 37 additions & 31 deletions wgtwo/pom-v1.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -33,7 +34,9 @@

<scm>
<connection>scm:git:[email protected]:working-group-two/wgtwoapis.git</connection>
<developerConnection>scm:git:[push=][email protected]:working-group-two/wgtwoapis.git[fetch=][email protected]:working-group-two/wgtwoapis.git</developerConnection>
<developerConnection>
scm:git:[push=][email protected]:working-group-two/wgtwoapis.git[fetch=][email protected]:working-group-two/wgtwoapis.git
</developerConnection>
<url>https://github.com/working-group-two/wgtwoapis.git</url>
<tag>v1.10.1</tag>
</scm>
Expand Down Expand Up @@ -80,7 +83,8 @@
<version>0.6.1</version>
<configuration>
<protoSourceRoot>${maven.multiModuleProjectDirectory}</protoSourceRoot>
<protocArtifact>com.google.protobuf:protoc:3.21.12:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:3.21.12:exe:${os.detected.classifier}
</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.52.1:exe:${os.detected.classifier}
</pluginArtifact>
Expand Down Expand Up @@ -111,8 +115,10 @@
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<scmCommentPrefix>[RELEASE] </scmCommentPrefix>
<tagNameFormat>v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</tagNameFormat>
<scmCommentPrefix>[RELEASE]</scmCommentPrefix>
<tagNameFormat>
v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}
</tagNameFormat>
<pomFileName>pom-v1.xml</pomFileName>
</configuration>
</plugin>
Expand Down Expand Up @@ -182,39 +188,39 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<developers>
<developer>
<name>WG2 Products Team</name>
<email>[email protected]</email>
<organization>Working Group Two</organization>
<organizationUrl>https://www.wgtwo.com</organizationUrl>
</developer>
<developer>
<name>WG2 Products Team</name>
<email>[email protected]</email>
<organization>Working Group Two</organization>
<organizationUrl>https://www.wgtwo.com</organizationUrl>
</developer>
</developers>

</project>

0 comments on commit 550a2d7

Please sign in to comment.