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

Commit

Permalink
fix: output provided.al2 also when zipGo is disabled (#1609)
Browse files Browse the repository at this point in the history
* fix: also emit `provided.al2` when zipGo is disabled

* fix: emit generator and runtimeVersion in zipGo path

---------

Co-authored-by: Lukas Holzer <[email protected]>
  • Loading branch information
Skn0tt and lukasholzer authored Oct 11, 2023
1 parent fffff21 commit d1a18f1
Showing 1 changed file with 9 additions and 5 deletions.
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

1 comment on commit d1a18f1

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱ Benchmark results

  • largeDepsEsbuild: 3.4s
  • largeDepsNft: 10.7s
  • largeDepsZisi: 20.6s

Please sign in to comment.