Include JRuby's pom.xml file when updating version numbers

pull/9047/head
Jason Lunn 3 years ago
parent f88c8ef11a
commit 793c66ddf0
  1. 17
      ruby/pom.xml
  2. 7
      update_version.py

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.google</groupId> <groupId>com.google</groupId>
@ -11,7 +9,7 @@
<groupId>com.google.protobuf.jruby</groupId> <groupId>com.google.protobuf.jruby</groupId>
<artifactId>protobuf-jruby</artifactId> <artifactId>protobuf-jruby</artifactId>
<version>1.0-SNAPSHOT</version> <version>3.18.0</version>
<name>Protocol Buffer JRuby native extension</name> <name>Protocol Buffer JRuby native extension</name>
<description> <description>
Protocol Buffers are a way of encoding structured data in an efficient yet Protocol Buffers are a way of encoding structured data in an efficient yet
@ -74,6 +72,12 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<!-- Ordering of dependencies matters to update_version.py -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>3.18.0</version>
</dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId> <artifactId>jackson-core</artifactId>
@ -85,10 +89,5 @@
<version>9.2.11.1</version> <version>9.2.11.1</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>3.18.0</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -358,6 +358,13 @@ def UpdatePython():
line)) line))
def UpdateRuby(): def UpdateRuby():
RewriteXml('ruby/pom.xml',
lambda document : ReplaceText(
Find(document.documentElement, 'version'), GetFullVersion()))
RewriteXml('ruby/pom.xml',
lambda document : ReplaceText(
Find(Find(Find(document.documentElement, 'dependencies'), 'dependency'), 'version'),
GetFullVersion()))
RewriteTextFile('ruby/google-protobuf.gemspec', RewriteTextFile('ruby/google-protobuf.gemspec',
lambda line : re.sub( lambda line : re.sub(
r'^ s.version = ".*"$', r'^ s.version = ".*"$',

Loading…
Cancel
Save