Skip to content

Commit

Permalink
fix(abg): use correct coordinates in generated maven metadata file
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Aug 19, 2024
1 parent 9a0e32a commit ba37150
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package io.github.typesafegithub.workflows.mavenbinding

import io.github.typesafegithub.workflows.actionbindinggenerator.domain.ActionCoords
import io.github.typesafegithub.workflows.shared.internal.fetchAvailableVersions
import java.time.Instant
import java.time.ZoneId
import java.time.format.DateTimeFormatter

internal suspend fun buildMavenMetadataFile(
owner: String,
name: String,
githubToken: String,
): String {
internal suspend fun ActionCoords.buildMavenMetadataFile(githubToken: String): String {
val lastUpdated =
DateTimeFormatter
.ofPattern("yyyyMMddHHmmss")
Expand All @@ -23,7 +20,7 @@ internal suspend fun buildMavenMetadataFile(
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>$owner</groupId>
<artifactId>${name.replace("__", "/")}</artifactId>
<artifactId>$name</artifactId>
<versioning>
<latest>$newest</latest>
<release>$newest</release>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package io.github.typesafegithub.workflows.mavenbinding
import io.github.typesafegithub.workflows.actionbindinggenerator.domain.ActionCoords

suspend fun ActionCoords.buildPackageArtifacts(githubToken: String): Map<String, String> {
val mavenMetadata = buildMavenMetadataFile(owner = owner, name = name, githubToken = githubToken)
val mavenMetadata = buildMavenMetadataFile(githubToken = githubToken)
return mapOf(
"maven-metadata.xml" to mavenMetadata,
)
Expand Down

0 comments on commit ba37150

Please sign in to comment.