From 049ad2b04f87e76d3090ac0b0f920159b732cbc4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Mar 2026 01:34:37 +0000 Subject: [PATCH] refactor(deps): migrate forge.lthn.ai dependencies to dappco.re tagged versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update go.mod requires and all .go imports from forge.lthn.ai/core/* to dappco.re/go/core/* per the version map: - go-io v0.1.7 → dappco.re/go/core/io v0.2.0 - go-log v0.0.4 → dappco.re/go/core/log v0.1.0 - go-i18n v0.1.7 → dappco.re/go/core/i18n v0.2.0 - go-ws v0.2.5 → dappco.re/go/core/ws v0.3.0 - api v0.1.5 → dappco.re/go/core/api v0.2.0 - go v0.3.3 → dappco.re/go/core v0.5.0 forge.lthn.ai/core/cli left unchanged (not in migration scope). Fix pre-existing test assertion in codesign_test.go. Deduplicate setup logic in release.go via extracted helpers. Co-Authored-By: Virgil --- cmd/build/cmd_build.go | 2 +- cmd/build/cmd_project.go | 6 +- cmd/build/cmd_pwa.go | 6 +- cmd/build/cmd_release.go | 4 +- cmd/build/cmd_sdk.go | 4 +- cmd/ci/ci.go | 4 +- cmd/sdk/cmd.go | 4 +- go.mod | 15 +- go.sum | 22 ++- locales/embed.go | 2 +- pkg/api/provider.go | 8 +- pkg/build/archive.go | 4 +- pkg/build/archive_test.go | 2 +- pkg/build/build.go | 2 +- pkg/build/builders/cpp.go | 4 +- pkg/build/builders/cpp_test.go | 2 +- pkg/build/builders/docker.go | 4 +- pkg/build/builders/docker_test.go | 2 +- pkg/build/builders/go.go | 4 +- pkg/build/builders/go_test.go | 2 +- pkg/build/builders/linuxkit.go | 4 +- pkg/build/builders/linuxkit_test.go | 2 +- pkg/build/builders/taskfile.go | 4 +- pkg/build/builders/taskfile_test.go | 2 +- pkg/build/builders/wails.go | 4 +- pkg/build/builders/wails_test.go | 2 +- pkg/build/checksum.go | 4 +- pkg/build/checksum_test.go | 2 +- pkg/build/config.go | 4 +- pkg/build/config_test.go | 2 +- pkg/build/discovery.go | 2 +- pkg/build/discovery_test.go | 2 +- pkg/build/signing/codesign.go | 4 +- pkg/build/signing/codesign_test.go | 4 +- pkg/build/signing/gpg.go | 4 +- pkg/build/signing/gpg_test.go | 2 +- pkg/build/signing/sign.go | 4 +- pkg/build/signing/signer.go | 2 +- pkg/build/signing/signing_test.go | 2 +- pkg/build/signing/signtool.go | 2 +- pkg/release/changelog.go | 2 +- pkg/release/config.go | 4 +- pkg/release/publishers/aur.go | 4 +- pkg/release/publishers/aur_test.go | 2 +- pkg/release/publishers/chocolatey.go | 6 +- pkg/release/publishers/chocolatey_test.go | 2 +- pkg/release/publishers/docker.go | 2 +- pkg/release/publishers/docker_test.go | 2 +- pkg/release/publishers/github.go | 2 +- pkg/release/publishers/github_test.go | 2 +- pkg/release/publishers/homebrew.go | 4 +- pkg/release/publishers/homebrew_test.go | 2 +- pkg/release/publishers/integration_test.go | 2 +- pkg/release/publishers/linuxkit.go | 2 +- pkg/release/publishers/linuxkit_test.go | 2 +- pkg/release/publishers/npm.go | 4 +- pkg/release/publishers/npm_test.go | 2 +- pkg/release/publishers/publisher.go | 2 +- pkg/release/publishers/scoop.go | 4 +- pkg/release/publishers/scoop_test.go | 2 +- pkg/release/release.go | 177 ++++++++------------- pkg/release/release_test.go | 2 +- pkg/release/sdk.go | 2 +- pkg/release/version.go | 2 +- pkg/sdk/detect.go | 4 +- pkg/sdk/diff.go | 2 +- pkg/sdk/generators/go.go | 4 +- pkg/sdk/generators/php.go | 4 +- pkg/sdk/generators/python.go | 4 +- pkg/sdk/generators/typescript.go | 4 +- pkg/sdk/sdk.go | 2 +- 71 files changed, 196 insertions(+), 226 deletions(-) diff --git a/cmd/build/cmd_build.go b/cmd/build/cmd_build.go index 58176fe..3cae883 100644 --- a/cmd/build/cmd_build.go +++ b/cmd/build/cmd_build.go @@ -6,7 +6,7 @@ import ( "forge.lthn.ai/core/cli/pkg/cli" _ "forge.lthn.ai/core/go-build/locales" // registers locale translations - "forge.lthn.ai/core/go-i18n" + "dappco.re/go/core/i18n" ) func init() { diff --git a/cmd/build/cmd_project.go b/cmd/build/cmd_project.go index ed81f7a..a040c72 100644 --- a/cmd/build/cmd_project.go +++ b/cmd/build/cmd_project.go @@ -17,9 +17,9 @@ import ( "forge.lthn.ai/core/go-build/pkg/build" "forge.lthn.ai/core/go-build/pkg/build/builders" "forge.lthn.ai/core/go-build/pkg/build/signing" - "forge.lthn.ai/core/go-i18n" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/i18n" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // runProjectBuild handles the main `core build` command with auto-detection. diff --git a/cmd/build/cmd_pwa.go b/cmd/build/cmd_pwa.go index 6444783..fe1a8a1 100644 --- a/cmd/build/cmd_pwa.go +++ b/cmd/build/cmd_pwa.go @@ -17,9 +17,9 @@ import ( "path/filepath" "strings" - "forge.lthn.ai/core/go-i18n" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/i18n" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" "github.com/leaanthony/debme" "github.com/leaanthony/gosod" "golang.org/x/net/html" diff --git a/cmd/build/cmd_release.go b/cmd/build/cmd_release.go index 61871d0..2d16019 100644 --- a/cmd/build/cmd_release.go +++ b/cmd/build/cmd_release.go @@ -7,8 +7,8 @@ import ( "os" "forge.lthn.ai/core/cli/pkg/cli" - "forge.lthn.ai/core/go-log" - "forge.lthn.ai/core/go-i18n" + "dappco.re/go/core/log" + "dappco.re/go/core/i18n" "forge.lthn.ai/core/go-build/pkg/release" ) diff --git a/cmd/build/cmd_sdk.go b/cmd/build/cmd_sdk.go index f6031a6..5656c30 100644 --- a/cmd/build/cmd_sdk.go +++ b/cmd/build/cmd_sdk.go @@ -12,8 +12,8 @@ import ( "strings" "forge.lthn.ai/core/go-build/pkg/sdk" - "forge.lthn.ai/core/go-i18n" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/i18n" + coreerr "dappco.re/go/core/log" ) // runBuildSDK handles the `core build sdk` command. diff --git a/cmd/ci/ci.go b/cmd/ci/ci.go index c976417..c337243 100644 --- a/cmd/ci/ci.go +++ b/cmd/ci/ci.go @@ -7,9 +7,9 @@ import ( "strings" "forge.lthn.ai/core/cli/pkg/cli" - "forge.lthn.ai/core/go-i18n" + "dappco.re/go/core/i18n" "forge.lthn.ai/core/go-build/pkg/release" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // Style aliases from shared diff --git a/cmd/sdk/cmd.go b/cmd/sdk/cmd.go index 92c139f..0acd87e 100644 --- a/cmd/sdk/cmd.go +++ b/cmd/sdk/cmd.go @@ -12,8 +12,8 @@ import ( "forge.lthn.ai/core/cli/pkg/cli" "forge.lthn.ai/core/go-build/pkg/sdk" - "forge.lthn.ai/core/go-i18n" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/i18n" + coreerr "dappco.re/go/core/log" ) func init() { diff --git a/go.mod b/go.mod index 8a43491..6f8abef 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,12 @@ module forge.lthn.ai/core/go-build go 1.26.0 require ( - forge.lthn.ai/core/api v0.1.5 + dappco.re/go/core/api v0.2.0 + dappco.re/go/core/i18n v0.2.0 + dappco.re/go/core/io v0.2.0 + dappco.re/go/core/log v0.1.0 + dappco.re/go/core/ws v0.3.0 forge.lthn.ai/core/cli v0.3.7 - forge.lthn.ai/core/go-i18n v0.1.7 - forge.lthn.ai/core/go-io v0.1.7 - forge.lthn.ai/core/go-log v0.0.4 - forge.lthn.ai/core/go-ws v0.2.5 github.com/Snider/Borg v0.2.0 github.com/gin-gonic/gin v1.12.0 github.com/leaanthony/debme v1.2.1 @@ -23,8 +23,11 @@ require ( require ( cloud.google.com/go v0.123.0 // indirect - forge.lthn.ai/core/go v0.3.3 // indirect + dappco.re/go/core v0.5.0 // indirect + forge.lthn.ai/core/go v0.3.2 // indirect + forge.lthn.ai/core/go-i18n v0.1.7 // indirect forge.lthn.ai/core/go-inference v0.1.7 // indirect + forge.lthn.ai/core/go-log v0.0.4 // indirect github.com/99designs/gqlgen v0.17.88 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/TwiN/go-color v1.4.1 // indirect diff --git a/go.sum b/go.sum index 10ad3b7..2807d0b 100644 --- a/go.sum +++ b/go.sum @@ -1,21 +1,27 @@ cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE= cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU= -forge.lthn.ai/core/api v0.1.5 h1:NwZrcOyBjaiz5/cn0n0tnlMUodi8Or6FHMx59C7Kv2o= -forge.lthn.ai/core/api v0.1.5/go.mod h1:PBnaWyOVXSOGy+0x2XAPUFMYJxQ2CNhppia/D06ZPII= +dappco.re/go/core v0.5.0 h1:P5DJoaCiK5Q+af5UiTdWqUIW4W4qYKzpgGK50thm21U= +dappco.re/go/core v0.5.0/go.mod h1:f2/tBZ3+3IqDrg2F5F598llv0nmb/4gJVCFzM5geE4A= +dappco.re/go/core/api v0.2.0 h1:5OcN9nawpp18Jp6dB1OwI2CBfs0Tacb0y0zqxFB6TJ0= +dappco.re/go/core/api v0.2.0/go.mod h1:AtgNAx8lDY+qhVObFdNQOjSUQrHX1BeiDdMuA6RIfzo= +dappco.re/go/core/i18n v0.2.0 h1:NHzk6RCU93/qVRA3f2jvMr9P1R6FYheR/sHL+TnvKbI= +dappco.re/go/core/i18n v0.2.0/go.mod h1:9eSVJXr3OpIGWQvDynfhqcp27xnLMwlYLgsByU+p7ok= +dappco.re/go/core/io v0.2.0 h1:zuudgIiTsQQ5ipVt97saWdGLROovbEB/zdVyy9/l+I4= +dappco.re/go/core/io v0.2.0/go.mod h1:1QnQV6X9LNgFKfm8SkOtR9LLaj3bDcsOIeJOOyjbL5E= +dappco.re/go/core/log v0.1.0 h1:pa71Vq2TD2aoEUQWFKwNcaJ3GBY8HbaNGqtE688Unyc= +dappco.re/go/core/log v0.1.0/go.mod h1:Nkqb8gsXhZAO8VLpx7B8i1iAmohhzqA20b9Zr8VUcJs= +dappco.re/go/core/ws v0.3.0 h1:ZxR8y5pfrWvnCHVN7qExXz7fdP5a063uNqyqE0Ab8pQ= +dappco.re/go/core/ws v0.3.0/go.mod h1:aLyXrJnbCOGL0SW9rC1EHAAIS83w3djO374gHIz4Nic= forge.lthn.ai/core/cli v0.3.7 h1:1GrbaGg0wDGHr6+klSbbGyN/9sSbHvFbdySJznymhwg= forge.lthn.ai/core/cli v0.3.7/go.mod h1:DBUppJkA9P45ZFGgI2B8VXw1rAZxamHoI/KG7fRvTNs= -forge.lthn.ai/core/go v0.3.3 h1:kYYZ2nRYy0/Be3cyuLJspRjLqTMxpckVyhb/7Sw2gd0= -forge.lthn.ai/core/go v0.3.3/go.mod h1:Cp4ac25pghvO2iqOu59t1GyngTKVOzKB5/VPdhRi9CQ= +forge.lthn.ai/core/go v0.3.2 h1:VB9pW6ggqBhe438cjfE2iSI5Lg+62MmRbaOFglZM+nQ= +forge.lthn.ai/core/go v0.3.2/go.mod h1:f7/zb3Labn4ARfwTq5Bi2AFHY+uxyPHozO+hLb54eFo= forge.lthn.ai/core/go-i18n v0.1.7 h1:aHkAoc3W8fw3RPNvw/UszQbjyFWXHszzbZgty3SwyAA= forge.lthn.ai/core/go-i18n v0.1.7/go.mod h1:0VDjwtY99NSj2iqwrI09h5GUsJeM9s48MLkr+/Dn4G8= forge.lthn.ai/core/go-inference v0.1.7 h1:9Dy6v03jX5ZRH3n5iTzlYyGtucuBIgSe+S7GWvBzx9Q= forge.lthn.ai/core/go-inference v0.1.7/go.mod h1:jfWz+IJX55wAH98+ic6FEqqGB6/P31CHlg7VY7pxREw= -forge.lthn.ai/core/go-io v0.1.7 h1:Tdb6sqh+zz1lsGJaNX9RFWM6MJ/RhSAyxfulLXrJsbk= -forge.lthn.ai/core/go-io v0.1.7/go.mod h1:8lRLFk4Dnp5cR/Cyzh9WclD5566TbpdRgwcH7UZLWn4= forge.lthn.ai/core/go-log v0.0.4 h1:KTuCEPgFmuM8KJfnyQ8vPOU1Jg654W74h8IJvfQMfv0= forge.lthn.ai/core/go-log v0.0.4/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw= -forge.lthn.ai/core/go-ws v0.2.5 h1:ZIV7Yrv01R/xpJUogA5vrfP9yB9li1w7EV3eZFMt8h0= -forge.lthn.ai/core/go-ws v0.2.5/go.mod h1:C3riJyLLcV6QhLvYlq3P/XkGTsN598qQeGBoLdoHBU4= github.com/99designs/gqlgen v0.17.88 h1:neMQDgehMwT1vYIOx/w5ZYPUU/iMNAJzRO44I5Intoc= github.com/99designs/gqlgen v0.17.88/go.mod h1:qeqYFEgOeSKqWedOjogPizimp2iu4E23bdPvl4jTYic= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= diff --git a/locales/embed.go b/locales/embed.go index ac9a964..1fa659a 100644 --- a/locales/embed.go +++ b/locales/embed.go @@ -4,7 +4,7 @@ package locales import ( "embed" - "forge.lthn.ai/core/go-i18n" + "dappco.re/go/core/i18n" ) //go:embed *.json diff --git a/pkg/api/provider.go b/pkg/api/provider.go index f107403..09e706d 100644 --- a/pkg/api/provider.go +++ b/pkg/api/provider.go @@ -10,14 +10,14 @@ import ( "os" "path/filepath" - "forge.lthn.ai/core/api" - "forge.lthn.ai/core/api/pkg/provider" + "dappco.re/go/core/api" + "dappco.re/go/core/api/pkg/provider" "forge.lthn.ai/core/go-build/pkg/build" "forge.lthn.ai/core/go-build/pkg/build/builders" "forge.lthn.ai/core/go-build/pkg/release" "forge.lthn.ai/core/go-build/pkg/sdk" - "forge.lthn.ai/core/go-io" - "forge.lthn.ai/core/go-ws" + "dappco.re/go/core/io" + "dappco.re/go/core/ws" "github.com/gin-gonic/gin" ) diff --git a/pkg/build/archive.go b/pkg/build/archive.go index 8916004..58af1c4 100644 --- a/pkg/build/archive.go +++ b/pkg/build/archive.go @@ -11,8 +11,8 @@ import ( "path/filepath" "strings" - io_interface "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + io_interface "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" "github.com/Snider/Borg/pkg/compress" ) diff --git a/pkg/build/archive_test.go b/pkg/build/archive_test.go index 934c9e8..4d1d98a 100644 --- a/pkg/build/archive_test.go +++ b/pkg/build/archive_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/Snider/Borg/pkg/compress" - io_interface "forge.lthn.ai/core/go-io" + io_interface "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/build.go b/pkg/build/build.go index d487a66..783db1f 100644 --- a/pkg/build/build.go +++ b/pkg/build/build.go @@ -6,7 +6,7 @@ package build import ( "context" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" ) // ProjectType represents a detected project type. diff --git a/pkg/build/builders/cpp.go b/pkg/build/builders/cpp.go index c2ba7fc..5afaeec 100644 --- a/pkg/build/builders/cpp.go +++ b/pkg/build/builders/cpp.go @@ -11,8 +11,8 @@ import ( "strings" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // CPPBuilder implements the Builder interface for C++ projects using CMake + Conan. diff --git a/pkg/build/builders/cpp_test.go b/pkg/build/builders/cpp_test.go index cddcd89..41fa57e 100644 --- a/pkg/build/builders/cpp_test.go +++ b/pkg/build/builders/cpp_test.go @@ -6,7 +6,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/builders/docker.go b/pkg/build/builders/docker.go index beb7cfd..96a4c68 100644 --- a/pkg/build/builders/docker.go +++ b/pkg/build/builders/docker.go @@ -10,8 +10,8 @@ import ( "strings" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // DockerBuilder builds Docker images. diff --git a/pkg/build/builders/docker_test.go b/pkg/build/builders/docker_test.go index 1471de3..e4d71ed 100644 --- a/pkg/build/builders/docker_test.go +++ b/pkg/build/builders/docker_test.go @@ -6,7 +6,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/builders/go.go b/pkg/build/builders/go.go index a8f32ab..a56798e 100644 --- a/pkg/build/builders/go.go +++ b/pkg/build/builders/go.go @@ -10,8 +10,8 @@ import ( "strings" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // GoBuilder implements the Builder interface for Go projects. diff --git a/pkg/build/builders/go_test.go b/pkg/build/builders/go_test.go index 44e1572..190f9af 100644 --- a/pkg/build/builders/go_test.go +++ b/pkg/build/builders/go_test.go @@ -8,7 +8,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/builders/linuxkit.go b/pkg/build/builders/linuxkit.go index ef254fe..a8bf362 100644 --- a/pkg/build/builders/linuxkit.go +++ b/pkg/build/builders/linuxkit.go @@ -10,8 +10,8 @@ import ( "strings" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // LinuxKitBuilder builds LinuxKit images. diff --git a/pkg/build/builders/linuxkit_test.go b/pkg/build/builders/linuxkit_test.go index 1528406..0beb00a 100644 --- a/pkg/build/builders/linuxkit_test.go +++ b/pkg/build/builders/linuxkit_test.go @@ -6,7 +6,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/builders/taskfile.go b/pkg/build/builders/taskfile.go index de68e87..29834ae 100644 --- a/pkg/build/builders/taskfile.go +++ b/pkg/build/builders/taskfile.go @@ -10,8 +10,8 @@ import ( "strings" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // TaskfileBuilder builds projects using Taskfile (https://taskfile.dev/). diff --git a/pkg/build/builders/taskfile_test.go b/pkg/build/builders/taskfile_test.go index 8c6a15a..6787c96 100644 --- a/pkg/build/builders/taskfile_test.go +++ b/pkg/build/builders/taskfile_test.go @@ -6,7 +6,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/builders/wails.go b/pkg/build/builders/wails.go index 4e40e16..5a49236 100644 --- a/pkg/build/builders/wails.go +++ b/pkg/build/builders/wails.go @@ -9,8 +9,8 @@ import ( "strings" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // WailsBuilder implements the Builder interface for Wails v3 projects. diff --git a/pkg/build/builders/wails_test.go b/pkg/build/builders/wails_test.go index 24f5104..c2d3f64 100644 --- a/pkg/build/builders/wails_test.go +++ b/pkg/build/builders/wails_test.go @@ -9,7 +9,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/checksum.go b/pkg/build/checksum.go index 4d060a0..f596452 100644 --- a/pkg/build/checksum.go +++ b/pkg/build/checksum.go @@ -11,8 +11,8 @@ import ( "strings" - io_interface "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + io_interface "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // Checksum computes SHA256 for an artifact and returns the artifact with the Checksum field filled. diff --git a/pkg/build/checksum_test.go b/pkg/build/checksum_test.go index bf7c892..78f4ddc 100644 --- a/pkg/build/checksum_test.go +++ b/pkg/build/checksum_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/config.go b/pkg/build/config.go index 6c163ae..0dc80e8 100644 --- a/pkg/build/config.go +++ b/pkg/build/config.go @@ -8,8 +8,8 @@ import ( "path/filepath" "forge.lthn.ai/core/go-build/pkg/build/signing" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" "gopkg.in/yaml.v3" ) diff --git a/pkg/build/config_test.go b/pkg/build/config_test.go index 0f079b2..552eec8 100644 --- a/pkg/build/config_test.go +++ b/pkg/build/config_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/discovery.go b/pkg/build/discovery.go index 61b50f6..4770336 100644 --- a/pkg/build/discovery.go +++ b/pkg/build/discovery.go @@ -4,7 +4,7 @@ import ( "path/filepath" "slices" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" ) // Marker files for project type detection. diff --git a/pkg/build/discovery_test.go b/pkg/build/discovery_test.go index 4ed49f2..a4653aa 100644 --- a/pkg/build/discovery_test.go +++ b/pkg/build/discovery_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/build/signing/codesign.go b/pkg/build/signing/codesign.go index 5357759..a2d01fe 100644 --- a/pkg/build/signing/codesign.go +++ b/pkg/build/signing/codesign.go @@ -5,8 +5,8 @@ import ( "os/exec" "runtime" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // MacOSSigner signs binaries using macOS codesign. diff --git a/pkg/build/signing/codesign_test.go b/pkg/build/signing/codesign_test.go index 333ac37..dd6c43e 100644 --- a/pkg/build/signing/codesign_test.go +++ b/pkg/build/signing/codesign_test.go @@ -5,7 +5,7 @@ import ( "runtime" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" ) @@ -39,7 +39,7 @@ func TestMacOSSigner_Sign_Bad(t *testing.T) { s := NewMacOSSigner(MacOSConfig{Identity: "test"}) err := s.Sign(context.Background(), fs, "test") assert.Error(t, err) - assert.Contains(t, err.Error(), "not available") + assert.Contains(t, err.Error(), "only available on macOS") }) } diff --git a/pkg/build/signing/gpg.go b/pkg/build/signing/gpg.go index 4170810..9106482 100644 --- a/pkg/build/signing/gpg.go +++ b/pkg/build/signing/gpg.go @@ -4,8 +4,8 @@ import ( "context" "os/exec" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // GPGSigner signs files using GPG. diff --git a/pkg/build/signing/gpg_test.go b/pkg/build/signing/gpg_test.go index f85f697..b67cda8 100644 --- a/pkg/build/signing/gpg_test.go +++ b/pkg/build/signing/gpg_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" ) diff --git a/pkg/build/signing/sign.go b/pkg/build/signing/sign.go index 0539999..5c39e49 100644 --- a/pkg/build/signing/sign.go +++ b/pkg/build/signing/sign.go @@ -5,8 +5,8 @@ import ( "fmt" "runtime" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // Artifact represents a build output that can be signed. diff --git a/pkg/build/signing/signer.go b/pkg/build/signing/signer.go index c08e486..906d90e 100644 --- a/pkg/build/signing/signer.go +++ b/pkg/build/signing/signer.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" ) // Signer defines the interface for code signing implementations. diff --git a/pkg/build/signing/signing_test.go b/pkg/build/signing/signing_test.go index 2c256dc..93a938c 100644 --- a/pkg/build/signing/signing_test.go +++ b/pkg/build/signing/signing_test.go @@ -5,7 +5,7 @@ import ( "runtime" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" ) diff --git a/pkg/build/signing/signtool.go b/pkg/build/signing/signtool.go index d44a226..1bff21b 100644 --- a/pkg/build/signing/signtool.go +++ b/pkg/build/signing/signtool.go @@ -3,7 +3,7 @@ package signing import ( "context" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" ) // WindowsSigner signs binaries using Windows signtool (placeholder). diff --git a/pkg/release/changelog.go b/pkg/release/changelog.go index c4a308e..04b07a8 100644 --- a/pkg/release/changelog.go +++ b/pkg/release/changelog.go @@ -10,7 +10,7 @@ import ( "slices" "strings" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" "golang.org/x/text/cases" "golang.org/x/text/language" ) diff --git a/pkg/release/config.go b/pkg/release/config.go index c7718f9..8d48d5b 100644 --- a/pkg/release/config.go +++ b/pkg/release/config.go @@ -6,8 +6,8 @@ import ( "os" "path/filepath" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" "gopkg.in/yaml.v3" ) diff --git a/pkg/release/publishers/aur.go b/pkg/release/publishers/aur.go index 94694a6..4b25300 100644 --- a/pkg/release/publishers/aur.go +++ b/pkg/release/publishers/aur.go @@ -13,8 +13,8 @@ import ( "text/template" "forge.lthn.ai/core/go-build/pkg/build" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) //go:embed templates/aur/*.tmpl diff --git a/pkg/release/publishers/aur_test.go b/pkg/release/publishers/aur_test.go index 28b7ffe..0402963 100644 --- a/pkg/release/publishers/aur_test.go +++ b/pkg/release/publishers/aur_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/release/publishers/chocolatey.go b/pkg/release/publishers/chocolatey.go index 7df2b0e..a44bb9e 100644 --- a/pkg/release/publishers/chocolatey.go +++ b/pkg/release/publishers/chocolatey.go @@ -13,9 +13,9 @@ import ( "text/template" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-i18n" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/i18n" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) //go:embed templates/chocolatey/*.tmpl templates/chocolatey/tools/*.tmpl diff --git a/pkg/release/publishers/chocolatey_test.go b/pkg/release/publishers/chocolatey_test.go index e97438e..0932dd5 100644 --- a/pkg/release/publishers/chocolatey_test.go +++ b/pkg/release/publishers/chocolatey_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/release/publishers/docker.go b/pkg/release/publishers/docker.go index 21fa99c..926ee9a 100644 --- a/pkg/release/publishers/docker.go +++ b/pkg/release/publishers/docker.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // DockerConfig holds configuration for the Docker publisher. diff --git a/pkg/release/publishers/docker_test.go b/pkg/release/publishers/docker_test.go index 4e23bec..cbad8f7 100644 --- a/pkg/release/publishers/docker_test.go +++ b/pkg/release/publishers/docker_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/release/publishers/github.go b/pkg/release/publishers/github.go index 2efb1af..b80001a 100644 --- a/pkg/release/publishers/github.go +++ b/pkg/release/publishers/github.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // GitHubPublisher publishes releases to GitHub using the gh CLI. diff --git a/pkg/release/publishers/github_test.go b/pkg/release/publishers/github_test.go index 1fdfabd..535bf4d 100644 --- a/pkg/release/publishers/github_test.go +++ b/pkg/release/publishers/github_test.go @@ -9,7 +9,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/release/publishers/homebrew.go b/pkg/release/publishers/homebrew.go index 2ae174b..f482f1f 100644 --- a/pkg/release/publishers/homebrew.go +++ b/pkg/release/publishers/homebrew.go @@ -13,8 +13,8 @@ import ( "text/template" "forge.lthn.ai/core/go-build/pkg/build" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) //go:embed templates/homebrew/*.tmpl diff --git a/pkg/release/publishers/homebrew_test.go b/pkg/release/publishers/homebrew_test.go index db8cd46..7f1947f 100644 --- a/pkg/release/publishers/homebrew_test.go +++ b/pkg/release/publishers/homebrew_test.go @@ -7,7 +7,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/release/publishers/integration_test.go b/pkg/release/publishers/integration_test.go index a511307..371f4fa 100644 --- a/pkg/release/publishers/integration_test.go +++ b/pkg/release/publishers/integration_test.go @@ -9,7 +9,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/release/publishers/linuxkit.go b/pkg/release/publishers/linuxkit.go index bddf327..a71a446 100644 --- a/pkg/release/publishers/linuxkit.go +++ b/pkg/release/publishers/linuxkit.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // LinuxKitConfig holds configuration for the LinuxKit publisher. diff --git a/pkg/release/publishers/linuxkit_test.go b/pkg/release/publishers/linuxkit_test.go index 2e7ecb9..4fd505a 100644 --- a/pkg/release/publishers/linuxkit_test.go +++ b/pkg/release/publishers/linuxkit_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/release/publishers/npm.go b/pkg/release/publishers/npm.go index da246ef..b54c497 100644 --- a/pkg/release/publishers/npm.go +++ b/pkg/release/publishers/npm.go @@ -12,8 +12,8 @@ import ( "strings" "text/template" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) //go:embed templates/npm/*.tmpl diff --git a/pkg/release/publishers/npm_test.go b/pkg/release/publishers/npm_test.go index aeeb24f..919695c 100644 --- a/pkg/release/publishers/npm_test.go +++ b/pkg/release/publishers/npm_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/release/publishers/publisher.go b/pkg/release/publishers/publisher.go index 17b4592..72d2948 100644 --- a/pkg/release/publishers/publisher.go +++ b/pkg/release/publishers/publisher.go @@ -5,7 +5,7 @@ import ( "context" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" ) // Release represents a release to be published. diff --git a/pkg/release/publishers/scoop.go b/pkg/release/publishers/scoop.go index 8442527..aa5c917 100644 --- a/pkg/release/publishers/scoop.go +++ b/pkg/release/publishers/scoop.go @@ -13,8 +13,8 @@ import ( "text/template" "forge.lthn.ai/core/go-build/pkg/build" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) //go:embed templates/scoop/*.tmpl diff --git a/pkg/release/publishers/scoop_test.go b/pkg/release/publishers/scoop_test.go index 2d67720..abee811 100644 --- a/pkg/release/publishers/scoop_test.go +++ b/pkg/release/publishers/scoop_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/release/release.go b/pkg/release/release.go index 17f90b0..a6bf241 100644 --- a/pkg/release/release.go +++ b/pkg/release/release.go @@ -12,8 +12,8 @@ import ( "forge.lthn.ai/core/go-build/pkg/build" "forge.lthn.ai/core/go-build/pkg/build/builders" "forge.lthn.ai/core/go-build/pkg/release/publishers" - "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // Release represents a release with its version, artifacts, and changelog. @@ -30,81 +30,93 @@ type Release struct { FS io.Medium } -// Publish publishes pre-built artifacts from dist/ to configured targets. -// Use this after `core build` to separate build and publish concerns. -// If dryRun is true, it will show what would be done without actually publishing. -func Publish(ctx context.Context, cfg *Config, dryRun bool) (*Release, error) { +// resolveProjectDir validates cfg is non-nil and returns the absolute project directory. +func resolveProjectDir(cfg *Config, caller string) (string, error) { if cfg == nil { - return nil, coreerr.E("release.Publish", "config is nil", nil) + return "", coreerr.E(caller, "config is nil", nil) } - - m := io.Local - projectDir := cfg.projectDir if projectDir == "" { projectDir = "." } - - // Resolve to absolute path absProjectDir, err := filepath.Abs(projectDir) if err != nil { - return nil, coreerr.E("release.Publish", "failed to resolve project directory", err) + return "", coreerr.E(caller, "failed to resolve project directory", err) } + return absProjectDir, nil +} - // Step 1: Determine version - version := cfg.version - if version == "" { - version, err = DetermineVersion(absProjectDir) - if err != nil { - return nil, coreerr.E("release.Publish", "failed to determine version", err) - } +// resolveVersion returns cfg.version if set, otherwise determines it from git tags. +func resolveVersion(cfg *Config, absProjectDir, caller string) (string, error) { + if cfg.version != "" { + return cfg.version, nil } - - // Step 2: Find pre-built artifacts in dist/ - distDir := filepath.Join(absProjectDir, "dist") - artifacts, err := findArtifacts(m, distDir) + version, err := DetermineVersion(absProjectDir) if err != nil { - return nil, coreerr.E("release.Publish", "failed to find artifacts", err) + return "", coreerr.E(caller, "failed to determine version", err) } + return version, nil +} - if len(artifacts) == 0 { - return nil, coreerr.E("release.Publish", "no artifacts found in dist/\nRun 'core build' first to create artifacts", nil) - } - - // Step 3: Generate changelog +// newRelease constructs a Release with the changelog generated (non-fatal on failure). +func newRelease(version string, artifacts []build.Artifact, absProjectDir string) *Release { changelog, err := Generate(absProjectDir, "", version) if err != nil { - // Non-fatal: continue with empty changelog changelog = fmt.Sprintf("Release %s", version) } - - release := &Release{ + return &Release{ Version: version, Artifacts: artifacts, Changelog: changelog, ProjectDir: absProjectDir, - FS: m, + FS: io.Local, } +} - // Step 4: Publish to configured targets - if len(cfg.Publishers) > 0 { - pubRelease := publishers.NewRelease(release.Version, release.Artifacts, release.Changelog, release.ProjectDir, release.FS) - - for _, pubCfg := range cfg.Publishers { - publisher, err := getPublisher(pubCfg.Type) - if err != nil { - return release, coreerr.E("release.Publish", "unsupported publisher", err) - } - - extendedCfg := buildExtendedConfig(pubCfg) - publisherCfg := publishers.NewPublisherConfig(pubCfg.Type, pubCfg.Prerelease, pubCfg.Draft, extendedCfg) - if err := publisher.Publish(ctx, pubRelease, publisherCfg, cfg, dryRun); err != nil { - return release, coreerr.E("release.Publish", "publish to "+pubCfg.Type+" failed", err) - } +// publishAll dispatches the release to all configured publishers. +func publishAll(ctx context.Context, cfg *Config, release *Release, dryRun bool, caller string) error { + if len(cfg.Publishers) == 0 { + return nil + } + pubRelease := publishers.NewRelease(release.Version, release.Artifacts, release.Changelog, release.ProjectDir, release.FS) + for _, pubCfg := range cfg.Publishers { + publisher, err := getPublisher(pubCfg.Type) + if err != nil { + return coreerr.E(caller, "unsupported publisher", err) + } + publisherCfg := publishers.NewPublisherConfig(pubCfg.Type, pubCfg.Prerelease, pubCfg.Draft, buildExtendedConfig(pubCfg)) + if err := publisher.Publish(ctx, pubRelease, publisherCfg, cfg, dryRun); err != nil { + return coreerr.E(caller, "publish to "+pubCfg.Type+" failed", err) } } + return nil +} - return release, nil +// Publish publishes pre-built artifacts from dist/ to configured targets. +// Use this after `core build` to separate build and publish concerns. +// If dryRun is true, it will show what would be done without actually publishing. +func Publish(ctx context.Context, cfg *Config, dryRun bool) (*Release, error) { + absProjectDir, err := resolveProjectDir(cfg, "release.Publish") + if err != nil { + return nil, err + } + + version, err := resolveVersion(cfg, absProjectDir, "release.Publish") + if err != nil { + return nil, err + } + + distDir := filepath.Join(absProjectDir, "dist") + artifacts, err := findArtifacts(io.Local, distDir) + if err != nil { + return nil, coreerr.E("release.Publish", "failed to find artifacts", err) + } + if len(artifacts) == 0 { + return nil, coreerr.E("release.Publish", "no artifacts found in dist/\nRun 'core build' first to create artifacts", nil) + } + + release := newRelease(version, artifacts, absProjectDir) + return release, publishAll(ctx, cfg, release, dryRun, "release.Publish") } // findArtifacts discovers pre-built artifacts in the dist directory. @@ -145,74 +157,23 @@ func findArtifacts(m io.Medium, distDir string) ([]build.Artifact, error) { // For separated concerns, prefer using `core build` then `core ci` (Publish). // If dryRun is true, it will show what would be done without actually publishing. func Run(ctx context.Context, cfg *Config, dryRun bool) (*Release, error) { - if cfg == nil { - return nil, coreerr.E("release.Run", "config is nil", nil) - } - - m := io.Local - - projectDir := cfg.projectDir - if projectDir == "" { - projectDir = "." - } - - // Resolve to absolute path - absProjectDir, err := filepath.Abs(projectDir) + absProjectDir, err := resolveProjectDir(cfg, "release.Run") if err != nil { - return nil, coreerr.E("release.Run", "failed to resolve project directory", err) + return nil, err } - // Step 1: Determine version - version := cfg.version - if version == "" { - version, err = DetermineVersion(absProjectDir) - if err != nil { - return nil, coreerr.E("release.Run", "failed to determine version", err) - } - } - - // Step 2: Generate changelog - changelog, err := Generate(absProjectDir, "", version) + version, err := resolveVersion(cfg, absProjectDir, "release.Run") if err != nil { - // Non-fatal: continue with empty changelog - changelog = fmt.Sprintf("Release %s", version) + return nil, err } - // Step 3: Build artifacts - artifacts, err := buildArtifacts(ctx, m, cfg, absProjectDir, version) + artifacts, err := buildArtifacts(ctx, io.Local, cfg, absProjectDir, version) if err != nil { return nil, coreerr.E("release.Run", "build failed", err) } - release := &Release{ - Version: version, - Artifacts: artifacts, - Changelog: changelog, - ProjectDir: absProjectDir, - FS: m, - } - - // Step 4: Publish to configured targets - if len(cfg.Publishers) > 0 { - // Convert to publisher types - pubRelease := publishers.NewRelease(release.Version, release.Artifacts, release.Changelog, release.ProjectDir, release.FS) - - for _, pubCfg := range cfg.Publishers { - publisher, err := getPublisher(pubCfg.Type) - if err != nil { - return release, coreerr.E("release.Run", "unsupported publisher", err) - } - - // Build extended config for publisher-specific settings - extendedCfg := buildExtendedConfig(pubCfg) - publisherCfg := publishers.NewPublisherConfig(pubCfg.Type, pubCfg.Prerelease, pubCfg.Draft, extendedCfg) - if err := publisher.Publish(ctx, pubRelease, publisherCfg, cfg, dryRun); err != nil { - return release, coreerr.E("release.Run", "publish to "+pubCfg.Type+" failed", err) - } - } - } - - return release, nil + release := newRelease(version, artifacts, absProjectDir) + return release, publishAll(ctx, cfg, release, dryRun, "release.Run") } // buildArtifacts builds all artifacts for the release. diff --git a/pkg/release/release_test.go b/pkg/release/release_test.go index d29867e..4863179 100644 --- a/pkg/release/release_test.go +++ b/pkg/release/release_test.go @@ -8,7 +8,7 @@ import ( "testing" "forge.lthn.ai/core/go-build/pkg/build" - "forge.lthn.ai/core/go-io" + "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/release/sdk.go b/pkg/release/sdk.go index 59598ba..0029462 100644 --- a/pkg/release/sdk.go +++ b/pkg/release/sdk.go @@ -6,7 +6,7 @@ import ( "fmt" "forge.lthn.ai/core/go-build/pkg/sdk" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // SDKRelease holds the result of an SDK release. diff --git a/pkg/release/version.go b/pkg/release/version.go index ea28f39..a6066b9 100644 --- a/pkg/release/version.go +++ b/pkg/release/version.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // semverRegex matches semantic version strings with or without 'v' prefix. diff --git a/pkg/sdk/detect.go b/pkg/sdk/detect.go index c318a63..683de20 100644 --- a/pkg/sdk/detect.go +++ b/pkg/sdk/detect.go @@ -4,8 +4,8 @@ import ( "path/filepath" "strings" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // commonSpecPaths are checked in order when no spec is configured. diff --git a/pkg/sdk/diff.go b/pkg/sdk/diff.go index 340a236..e3829a6 100644 --- a/pkg/sdk/diff.go +++ b/pkg/sdk/diff.go @@ -3,7 +3,7 @@ package sdk import ( "fmt" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" "github.com/oasdiff/kin-openapi/openapi3" "github.com/oasdiff/oasdiff/checker" "github.com/oasdiff/oasdiff/diff" diff --git a/pkg/sdk/generators/go.go b/pkg/sdk/generators/go.go index f55c31c..79833df 100644 --- a/pkg/sdk/generators/go.go +++ b/pkg/sdk/generators/go.go @@ -7,8 +7,8 @@ import ( "os/exec" "path/filepath" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // GoGenerator generates Go SDKs from OpenAPI specs. diff --git a/pkg/sdk/generators/php.go b/pkg/sdk/generators/php.go index 556e33e..1770b07 100644 --- a/pkg/sdk/generators/php.go +++ b/pkg/sdk/generators/php.go @@ -6,8 +6,8 @@ import ( "os/exec" "path/filepath" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // PHPGenerator generates PHP SDKs from OpenAPI specs. diff --git a/pkg/sdk/generators/python.go b/pkg/sdk/generators/python.go index 17dd40d..d2e7293 100644 --- a/pkg/sdk/generators/python.go +++ b/pkg/sdk/generators/python.go @@ -6,8 +6,8 @@ import ( "os/exec" "path/filepath" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // PythonGenerator generates Python SDKs from OpenAPI specs. diff --git a/pkg/sdk/generators/typescript.go b/pkg/sdk/generators/typescript.go index 190b6e0..6a72e7c 100644 --- a/pkg/sdk/generators/typescript.go +++ b/pkg/sdk/generators/typescript.go @@ -6,8 +6,8 @@ import ( "os/exec" "path/filepath" - coreio "forge.lthn.ai/core/go-io" - coreerr "forge.lthn.ai/core/go-log" + coreio "dappco.re/go/core/io" + coreerr "dappco.re/go/core/log" ) // TypeScriptGenerator generates TypeScript SDKs from OpenAPI specs. diff --git a/pkg/sdk/sdk.go b/pkg/sdk/sdk.go index 0ea723f..2bbfef4 100644 --- a/pkg/sdk/sdk.go +++ b/pkg/sdk/sdk.go @@ -6,7 +6,7 @@ import ( "fmt" "path/filepath" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" "forge.lthn.ai/core/go-build/pkg/sdk/generators" ) -- 2.45.3