From a55e505fc7d25c594142b6e3aa25f53d33782b98 Mon Sep 17 00:00:00 2001 From: mitchell Date: Mon, 9 Oct 2023 15:24:39 -0400 Subject: [PATCH] When deploying updates, strip SHA from bucket folder name. --- scripts/ci/update-generator/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/ci/update-generator/main.go b/scripts/ci/update-generator/main.go index 66293ca5cf..906c814765 100644 --- a/scripts/ci/update-generator/main.go +++ b/scripts/ci/update-generator/main.go @@ -11,6 +11,7 @@ import ( "os" "path/filepath" "runtime" + "strings" "github.com/mholt/archiver" @@ -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)