Skip to content

Commit 3cb3b7e

Browse files
committed
fix(abg): use correct coordinates in generated POM file
1 parent e909e7f commit 3cb3b7e

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

maven-binding-builder/src/main/kotlin/io/github/typesafegithub/workflows/mavenbinding/PomBuilding.kt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
package io.github.typesafegithub.workflows.mavenbinding
22

3+
import io.github.typesafegithub.workflows.actionbindinggenerator.domain.ActionCoords
4+
35
internal const val LATEST_RELASED_LIBRARY_VERSION = "2.3.0"
46

5-
internal fun buildPomFile(
6-
owner: String,
7-
name: String,
8-
version: String,
9-
): String {
10-
val nameForRepo = name.substringBefore("/")
7+
internal fun ActionCoords.buildPomFile(): String {
8+
val nameForRepo = name.substringBefore("__")
9+
val nameForDisplay = name.replace("__", "/")
1110
return """
1211
<?xml version="1.0" encoding="UTF-8"?>
1312
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
1413
<modelVersion>4.0.0</modelVersion>
1514
<groupId>$owner</groupId>
1615
<artifactId>$name</artifactId>
1716
<version>$version</version>
18-
<name>$name</name>
19-
<description>Auto-generated binding for $owner/$name@$version.</description>
17+
<name>$nameForDisplay</name>
18+
<description>Auto-generated binding for $owner/$nameForDisplay@$version.</description>
2019
<url>https://github.com/$owner/$nameForRepo</url>
2120
<scm>
2221
<connection>scm:git:git://github.com/$owner/$nameForRepo.git/</connection>

maven-binding-builder/src/main/kotlin/io/github/typesafegithub/workflows/mavenbinding/VersionArtifactsBuilding.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ data class JarArtifact(
1515

1616
fun ActionCoords.buildVersionArtifacts(types: String? = null): Map<String, Artifact>? {
1717
val jars = buildJars(owner = owner, name = name.replace("__", "/"), version = version, types = types) ?: return null
18-
val pom = buildPomFile(owner = owner, name = name.replace("__", "/"), version = version)
18+
val pom = buildPomFile()
1919
val module = buildModuleFile()
2020
return mapOf(
2121
"$name-$version.jar" to JarArtifact(jars.mainJar),

0 commit comments

Comments
 (0)