Skip to content

Commit

Permalink
When deploying updates, strip SHA from bucket folder name.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Oct 9, 2023
1 parent af7cfb6 commit a55e505
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/ci/update-generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"os"
"path/filepath"
"runtime"
"strings"

"github.com/mholt/archiver"

Expand Down Expand Up @@ -68,7 +69,11 @@ func archiveMeta() (archiveMethod archiver.Archiver, ext string) {

func createUpdate(outputPath, channel, version, platform, target string) error {
relChannelPath := filepath.Join(channel, platform)
relVersionedPath := filepath.Join(channel, version, platform)
versionNoSHA := version
if i := strings.Index(version, "-SHA"); i != -1 {
versionNoSHA = version[0:i]
}
relVersionedPath := filepath.Join(channel, versionNoSHA, platform)
_ = os.MkdirAll(filepath.Join(outputPath, relChannelPath), 0o755)
_ = os.MkdirAll(filepath.Join(outputPath, relVersionedPath), 0o755)

Expand Down

0 comments on commit a55e505

Please sign in to comment.