fix: refactor publish command (#12)
Some checks failed
Publish / Check GoReleaser config (push) Successful in 5s
Release / goreleaser (push) Failing after 26s
Publish / Publish provider (push) Successful in 6m49s

## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #12
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
This commit is contained in:
Marcel_Henselin 2026-01-29 16:48:31 +00:00 committed by Marcel_Henselin
parent 7fe135f337
commit bb54206ba9
Signed by: tf-provider.git.onstackit.cloud
GPG key ID: 6D7E8A1ED8955A9C

View file

@ -255,16 +255,16 @@ func copyShaFiles(destPath, srcPath, repoName, version string) {
// Copy files from srcPath
shaSum := repoName + "_" + version + "_SHA256SUMS"
shaSumPath := srcPath + "/" + shaSum
shaSumPath := path.Join(srcPath, shaSum)
// _SHA256SUMS file
_, err := copyFile(shaSumPath, destPath+shaSum)
_, err := copyFile(shaSumPath, path.Join(destPath, shaSum))
if err != nil {
log.Println(err)
}
// _SHA256SUMS.sig file
_, err = copyFile(shaSumPath+".sig", destPath+shaSum+".sig")
_, err = copyFile(shaSumPath+".sig", path.Join(destPath, shaSum+".sig"))
if err != nil {
log.Println(err)
}
@ -312,8 +312,8 @@ func copyBuildZips(destPath, distPath, repoName, version string) error {
// Loop through and copy each
for _, v := range shaSumContents {
zipName := v[1]
zipSrcPath := distPath + zipName
zipDestPath := destPath + zipName
zipSrcPath := path.Join(distPath, zipName)
zipDestPath := path.Join(destPath, zipName)
log.Printf(" - Zip Source: %s", zipSrcPath)
log.Printf(" - Zip Dest: %s", zipDestPath)