From bb54206ba9e03f24edd4e67319ac30f1aa1f080a Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 29 Jan 2026 16:48:31 +0000 Subject: [PATCH] fix: refactor publish command (#12) ## Description 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](https://github.com/stackitcloud/terraform-provider-stackit/blob/f5f99d170996b208672ae684b6da53420e369563/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: https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/pulls/12 Co-authored-by: Marcel S. Henselin Co-committed-by: Marcel S. Henselin --- cmd/cmd/publishCmd.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/cmd/publishCmd.go b/cmd/cmd/publishCmd.go index e47e3e29..6cb9dae9 100644 --- a/cmd/cmd/publishCmd.go +++ b/cmd/cmd/publishCmd.go @@ -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)