Skip to content

Commit

Permalink
Remove all appends of -SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed May 2, 2024
1 parent 8ad40ad commit c3a1eef
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private String join(String... parts) {

private String toPath(String name, String version, String timestamp, boolean snapshot) {
String v1 = snapshot ? version + "-" + timestamp : version;
String v2 = snapshot ? version + MavenPrereleasesRubygemsArtifactIdCuba.SNAPSHOT : version;
String v2 = version;
return join(snapshot ? MAVEN_PRERELEASED_RUBYGEMS : MAVEN_RELEASED_RUBYGEMS, SEPARATOR, name, SEPARATOR, v2, SEPARATOR, name + '-' + v1);
}

Expand Down Expand Up @@ -103,7 +103,7 @@ public GemArtifactFile gemArtifact(String name, String version) {

@Override
public MavenMetadataSnapshotFile mavenMetadataSnapshot(String name, String version) {
String path = join(MAVEN_PRERELEASED_RUBYGEMS, SEPARATOR, name, SEPARATOR, version + MavenPrereleasesRubygemsArtifactIdCuba.SNAPSHOT, SEPARATOR, MavenReleasesRubygemsArtifactIdCuba.MAVEN_METADATA_XML);
String path = join(MAVEN_PRERELEASED_RUBYGEMS, SEPARATOR, name, SEPARATOR, version, SEPARATOR, MavenReleasesRubygemsArtifactIdCuba.MAVEN_METADATA_XML);
return new MavenMetadataSnapshotFile(this, path, name, version);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public MetadataBuilder(DependencyData deps) {
public void appendVersions(boolean isPrerelease) {
for (String version : deps.versions(isPrerelease)) {
xml.append(" <version>").append(version);
if (isPrerelease) {
xml.append("-SNAPSHOT");
}
// if (isPrerelease) {
// xml.append("-SNAPSHOT");
// }
xml.append("</version>\n");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void testGemArtifact() throws Exception {

@Test
public void testGemSnapshotArtifact() throws Exception {
String path = "/maven/prereleases/rubygems/jbundler/1.2.3-SNAPSHOT/jbundler-1.2.3-123123123.gem";
String path = "/maven/prereleases/rubygems/jbundler/1.2.3/jbundler-1.2.3-123123123.gem";
RubygemsFile file = fileSystem.get(path);
assertThat(file, notNullValue());
RubygemsFile file2 = fileSystem.get(path);
Expand Down Expand Up @@ -114,7 +114,7 @@ public void testPomRelease() throws Exception {

@Test
public void testPomSnapshot() throws Exception {
String path = "/maven/prereleases/rubygems/jbundler/1.2.3-SNAPSHOT/jbundler-1.2.3-123123123.pom";
String path = "/maven/prereleases/rubygems/jbundler/1.2.3/jbundler-1.2.3-123123123.pom";
RubygemsFile file = fileSystem.get(path);
assertThat(file, notNullValue());
RubygemsFile file2 = fileSystem.get(path);
Expand Down Expand Up @@ -171,7 +171,7 @@ public void testMetadataXmlPrereleases() throws Exception {

@Test
public void testMetadataXmlSnapshots() throws Exception {
String path = "/maven/prereleases/rubygems/jbundler/9.2.3-SNAPSHOT/maven-metadata.xml";
String path = "/maven/prereleases/rubygems/jbundler/9.2.3/maven-metadata.xml";
RubygemsFile file = fileSystem.get(path);
assertThat(file, notNullValue());
RubygemsFile file2 = fileSystem.get(path);
Expand Down
86 changes: 43 additions & 43 deletions rubygems-tools/src/test/resources/metadata-prereleases.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,49 @@
<artifactId>nokogiri</artifactId>
<versioning>
<versions>
<version>1.5.0.beta.1-SNAPSHOT</version>
<version>1.5.0.beta.2-SNAPSHOT</version>
<version>1.5.0.beta.3-SNAPSHOT</version>
<version>1.5.0.beta.4-SNAPSHOT</version>
<version>1.5.1.rc1-SNAPSHOT</version>
<version>1.5.3.rc2-SNAPSHOT</version>
<version>1.5.3.rc3-SNAPSHOT</version>
<version>1.5.3.rc4-SNAPSHOT</version>
<version>1.5.3.rc5-SNAPSHOT</version>
<version>1.5.3.rc6-SNAPSHOT</version>
<version>1.5.4.rc1-SNAPSHOT</version>
<version>1.5.4.rc2-SNAPSHOT</version>
<version>1.5.4.rc3-SNAPSHOT</version>
<version>1.5.5.rc1-SNAPSHOT</version>
<version>1.5.5.rc2-SNAPSHOT</version>
<version>1.5.5.rc3-SNAPSHOT</version>
<version>1.5.6.rc1-SNAPSHOT</version>
<version>1.5.6.rc2-SNAPSHOT</version>
<version>1.5.6.rc3-SNAPSHOT</version>
<version>1.5.7.rc1-SNAPSHOT</version>
<version>1.5.7.rc2-SNAPSHOT</version>
<version>1.5.7.rc3-SNAPSHOT</version>
<version>1.6.0.rc1-SNAPSHOT</version>
<version>1.6.2.rc1-SNAPSHOT</version>
<version>1.6.2.rc2-SNAPSHOT</version>
<version>1.6.2.rc3-SNAPSHOT</version>
<version>1.6.3.rc1-SNAPSHOT</version>
<version>1.6.3.rc2-SNAPSHOT</version>
<version>1.6.3.rc3-SNAPSHOT</version>
<version>1.6.7.rc2-SNAPSHOT</version>
<version>1.6.7.rc3-SNAPSHOT</version>
<version>1.6.7.rc4-SNAPSHOT</version>
<version>1.6.8.rc1-SNAPSHOT</version>
<version>1.6.8.rc2-SNAPSHOT</version>
<version>1.6.8.rc3-SNAPSHOT</version>
<version>1.9.0.rc1-SNAPSHOT</version>
<version>1.10.0.rc1-SNAPSHOT</version>
<version>1.11.0.rc1-SNAPSHOT</version>
<version>1.11.0.rc2-SNAPSHOT</version>
<version>1.11.0.rc3-SNAPSHOT</version>
<version>1.11.0.rc4-SNAPSHOT</version>
<version>1.12.0.rc1-SNAPSHOT</version>
<version>1.14.0.rc1-SNAPSHOT</version>
<version>1.5.0.beta.1</version>
<version>1.5.0.beta.2</version>
<version>1.5.0.beta.3</version>
<version>1.5.0.beta.4</version>
<version>1.5.1.rc1</version>
<version>1.5.3.rc2</version>
<version>1.5.3.rc3</version>
<version>1.5.3.rc4</version>
<version>1.5.3.rc5</version>
<version>1.5.3.rc6</version>
<version>1.5.4.rc1</version>
<version>1.5.4.rc2</version>
<version>1.5.4.rc3</version>
<version>1.5.5.rc1</version>
<version>1.5.5.rc2</version>
<version>1.5.5.rc3</version>
<version>1.5.6.rc1</version>
<version>1.5.6.rc2</version>
<version>1.5.6.rc3</version>
<version>1.5.7.rc1</version>
<version>1.5.7.rc2</version>
<version>1.5.7.rc3</version>
<version>1.6.0.rc1</version>
<version>1.6.2.rc1</version>
<version>1.6.2.rc2</version>
<version>1.6.2.rc3</version>
<version>1.6.3.rc1</version>
<version>1.6.3.rc2</version>
<version>1.6.3.rc3</version>
<version>1.6.7.rc2</version>
<version>1.6.7.rc3</version>
<version>1.6.7.rc4</version>
<version>1.6.8.rc1</version>
<version>1.6.8.rc2</version>
<version>1.6.8.rc3</version>
<version>1.9.0.rc1</version>
<version>1.10.0.rc1</version>
<version>1.11.0.rc1</version>
<version>1.11.0.rc2</version>
<version>1.11.0.rc3</version>
<version>1.11.0.rc4</version>
<version>1.12.0.rc1</version>
<version>1.14.0.rc1</version>
</versions>
<lastUpdated>20140416150033</lastUpdated>
</versioning>
Expand Down
24 changes: 12 additions & 12 deletions rubygems-tools/src/test/resources/psych-prerelease-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<artifactId>psych</artifactId>
<versioning>
<versions>
<version>1.2.2.rc1-SNAPSHOT</version>
<version>2.0.14.pre1-SNAPSHOT</version>
<version>3.0.0.beta2-SNAPSHOT</version>
<version>3.0.0.beta3-SNAPSHOT</version>
<version>3.0.0.beta4-SNAPSHOT</version>
<version>3.0.3.pre1-SNAPSHOT</version>
<version>3.0.3.pre2-SNAPSHOT</version>
<version>3.0.3.pre3-SNAPSHOT</version>
<version>3.0.3.pre4-SNAPSHOT</version>
<version>3.0.3.pre5-SNAPSHOT</version>
<version>5.0.2.pre1-SNAPSHOT</version>
<version>5.1.0.pre1-SNAPSHOT</version>
<version>1.2.2.rc1</version>
<version>2.0.14.pre1</version>
<version>3.0.0.beta2</version>
<version>3.0.0.beta3</version>
<version>3.0.0.beta4</version>
<version>3.0.3.pre1</version>
<version>3.0.3.pre2</version>
<version>3.0.3.pre3</version>
<version>3.0.3.pre4</version>
<version>3.0.3.pre5</version>
<version>5.0.2.pre1</version>
<version>5.1.0.pre1</version>
</versions>
<lastUpdated>2014</lastUpdated>
</versioning>
Expand Down

0 comments on commit c3a1eef

Please sign in to comment.