Skip to content

Commit

Permalink
fix: replace all version update tags (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 authored and bcoe committed Sep 11, 2019
1 parent 254597f commit 54e0cd3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
8 changes: 2 additions & 6 deletions __snapshots__/pom-xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@ exports['PomXML updateContent updates version in pom.xml 1'] = `
<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>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<parent>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-parent</artifactId>
<version>0.19.0</version><!-- {x-version-update:google-auth-library-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-appengine</artifactId>
<version>0.19.0</version><!-- {x-version-update:google-auth-library-parent:current} -->
<name>Google Auth Library for Java - Google App Engine</name>
<distributionManagement>
Expand Down
2 changes: 1 addition & 1 deletion src/updaters/java/pom-xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class PomXML implements Update {
}
updateContent(content: string): string {
return content.replace(
/<version>.*<\/version>(.*x-version-update.*)/,
/<version>.*<\/version>(.*x-version-update.*)/g,
`<version>${this.version}</version>$1`
);
}
Expand Down
8 changes: 2 additions & 6 deletions test/updaters/fixtures/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@
<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>

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>

<parent>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-parent</artifactId>
<version>0.16.2</version><!-- {x-version-update:google-auth-library-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-appengine</artifactId>
<version>0.16.2</version><!-- {x-version-update:google-auth-library-parent:current} -->
<name>Google Auth Library for Java - Google App Engine</name>

<distributionManagement>
Expand Down

0 comments on commit 54e0cd3

Please sign in to comment.