Skip to content

Commit

Permalink
Merge pull request #138 from rancherfederal/fix-github-path
Browse files Browse the repository at this point in the history
fix carbide cosign repo path and perms
  • Loading branch information
amartin120 authored Nov 6, 2023
2 parents 4d950f7 + be486df commit 6062c20
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/cosign/cosign.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ func ensureCosignBinary(ctx context.Context, s *store.Layout) (string, error) {
}
}

// Make the binary executable.
if err := os.Chmod(filepath.Join(haulerDir, "cosign"), 0755); err != nil {
return "", fmt.Errorf("error setting executable permission: %v", err)
}

return binaryPath, nil
}

Expand Down Expand Up @@ -236,7 +241,7 @@ func downloadCosign(ctx context.Context, haulerDir string) error {
l := log.FromContext(ctx)

// Define the GitHub release URL and architecture-specific binary name.
releaseURL := "https://github.com/rancher-government-solutions/cosign/releases/latest/download"
releaseURL := "https://github.com/rancher-government-carbide/cosign/releases/latest/download"

// Determine the architecture and add it to the binary name.
arch := runtime.GOARCH
Expand Down Expand Up @@ -269,11 +274,6 @@ func downloadCosign(ctx context.Context, haulerDir string) error {
return fmt.Errorf("error saving cosign binary: %v", err)
}

// Make the binary executable.
if err := os.Chmod(binaryFile.Name(), 0755); err != nil {
return fmt.Errorf("error setting executable permission: %v", err)
}

// Rename the binary to "cosign"
oldBinaryPath := filepath.Join(haulerDir, binaryName)
newBinaryPath := filepath.Join(haulerDir, "cosign")
Expand Down

0 comments on commit 6062c20

Please sign in to comment.