Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

fix: output provided.al2 also when zipGo is disabled #1609

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/runtimes/go/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ const zipFunction: ZipFunction = async function ({
}
}

const result = {
config,
displayName: config?.name,
generator: config?.generator || getInternalValue(isInternal),
runtimeVersion: featureFlags.zisi_golang_use_al2 ? 'provided.al2' : undefined,
}

// If `zipGo` is enabled, we create a zip archive with the Go binary and the
// toolchain file.
if (config.zipGo) {
Expand All @@ -147,10 +154,9 @@ const zipFunction: ZipFunction = async function ({
await zipBinary({ ...zipOptions, srcPath: binary.path, stat: binary.stat })

return {
config,
...result,
path: zipPath,
entryFilename: zipOptions.filename,
runtimeVersion: featureFlags.zisi_golang_use_al2 ? 'provided.al2' : undefined,
}
}

Expand All @@ -162,11 +168,9 @@ const zipFunction: ZipFunction = async function ({
}

return {
config,
...result,
path: destPath,
entryFilename: '',
displayName: config?.name,
generator: config?.generator || getInternalValue(isInternal),
}
}

Expand Down