Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace all version update tags #260

Merged
merged 2 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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