Omi Chowdhury
07/28/2021, 7:46 PMgit-revision-webpack-plugin
but using serverless-bundle
with esbuild for the backend.
Easiest - although janky - way forward would to somehow add the current commit/tag as a env variable for the lambda, which it can then read for logs?Frank
SEED_BUILD_SERVICE_SHA
is available in the build environment and has the commit hash.Omi Chowdhury
07/28/2021, 8:36 PMOmi Chowdhury
07/28/2021, 8:36 PMreadFileSync
so that esbuild picks it upFrank
app.setDefaultFunctionProps({
environment: {
GIT_COMMIT: process.env.SEED_BUILD_SERVICE_SHA,
}
});
Omi Chowdhury
07/28/2021, 9:20 PMenvironment:
GIT_COMMIT: ${env:SEED_BUILD_SERVICE_SHA}
Frank
Omi Chowdhury
07/28/2021, 9:22 PM